2017-10-20 10:35 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000432mercuryFeature Requestpublic2017-03-21 15:48
Reporterwangp 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000432: pack constructor arguments in same word as primary tag
DescriptionWhen we have a data constructor with a primary tag, whose arguments have a total width less than or equal to the number of remaining bits, we could pack the arguments into the same word as the tag instead of a separate cell.

e.g.

:- type bits_or_string
    ---> bits(bool, bool, bool)
    ; string(string).

This would be more useful once we have smaller-than-word-size ints.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000944

zs (developer)

That is a good idea.

Actually, it could also be applied to secondary tags. If a type has enough non-constant functors to need a secondary tag for some functors, then at the moment, we allocate
the entire first word of the memory cells of those functors to the secondary tag.
However, we could allocate only the minimum number of secondary tag bits
needed to distinguish those functors, and allocate the rest to hold the packable
arguments of those functors.

However, I expect this would be useful much more rarely than Peter's original
proposal.
+Notes

-Issue History
Date Modified Username Field Change
2017-03-21 13:12 wangp New Issue
2017-03-21 15:48 zs Note Added: 0000944
+Issue History