2024-11-21 23:30 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000432mercuryFeature Requestpublic2018-02-22 14:06
Reporterwangp 
Assigned Tozs 
PrioritynormalSeverityminorReproducibilityalways
StatusassignedResolutionopen 
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
2018-02-22 14:06 zs Assigned To => zs
2018-02-22 14:06 zs Status new => assigned
+Issue History