Mercury Bugs - mercury | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0000458 | mercury | Feature Request | public | 2018-05-03 07:24 | 2018-10-03 09:23 |
Reporter | zs | ||||
---|---|---|---|---|---|
Assigned To | zs | ||||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | resolved | Resolution | fixed | ||
Platform | OS | OS Version | |||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0000458: optimize unify and compare for packed arguments | ||||
Description | At the moment, when unifying or comparing the arguments of two functors, we extract each argument from each functor and unify/compare the corresponding arguments individually. If two or more arguments of a functor are packed together into a single word, we could test whether they are *all* equal by testing whether the words are equal. (We always set all the unused bits to zeroes.) For comparison, the situation is trickier, but there is still room for optimization. First, we would need to change our allocation strategy. Our current strategy of putting the first packed argument into the least significant bits and the following arguments into more and more significant bits is exactly wrong for comparing the packed arguments all at once: we would need to put an earlier packed argument into more significant bits than a later argument packed into the same word. Second, even then we could compare a sequence of arguments packed into a word by comparing the full word only if all the packed arguments compare as unsigned values. If any of them are of type int{8,16,32}, then those would have to compared separately. However, any contiguous subsequence of unsigned arguments could and should be compared together. The most complex part of this would be devising the right HLDS representation of the operations that compare more than one argument at a time. Maybe we could generate foreign proc goals for them. Also note that this feature request somewhat modifies Mantis 0000446; we should NOT fetch the arguments that are packed together into the same word separately. | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files |
Notes | |||||
|
|||||
|
|
Issue History | |||||
Date Modified | Username | Field | Change | ||
---|---|---|---|---|---|
2018-05-03 07:24 | zs | New Issue | |||
2018-05-03 07:25 | zs | Assigned To | => zs | ||
2018-05-03 07:25 | zs | Status | new => assigned | ||
2018-10-03 09:23 | zs | Status | assigned => resolved | ||
2018-10-03 09:23 | zs | Resolution | open => fixed | ||
2018-10-03 09:23 | zs | Note Added: 0001015 |