PBC, Const Tables, and STRINGs
chromatic
chromatic at wgz.org
Mon Apr 26 00:16:26 UTC 2010
The current version of PBC uses constant tables for PIR artifacts such as
literal strings in PIR.
It doesn't use constant tables for data such as Sub metadata. While NQP can
generate closures and inner blocks fairly efficiently, we have to keep extra
constant STRINGs around in the system because our freeze/thaw mechanism
doesn't know how to store constant attributes of Subs in the packfile constant
tables.
We could reduce PBC size, fakecutable size, freezing time, thawing time, and
runtime memory use (not to mention GC runs) by coalescing these attributes
into PBC constants somehow.
Rough figures on Rakudo startup show some 405,000 STRINGs thawed from PBC,
while some 16,000 are unique. That's 95% waste.
Perhaps the ImageIO PMC's shift/unshift string VTABLEs could manage these
constant STRINGs appropriately.
-- c
More information about the parrot-dev
mailing list