|View Issue Details [ Jump to Notes ]||[ Issue History ] [ Print ]|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000432||mercury||Feature Request||public||2017-03-21 13:12||2018-02-22 14:06|
|Target Version||Fixed in Version|
|Summary||0000432: pack constructor arguments in same word as primary tag|
|Description||When 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.|
:- type bits_or_string
---> bits(bool, bool, bool)
This would be more useful once we have smaller-than-word-size ints.
|Tags||No tags attached.|
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
|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|