This optimization has been implemented in the pbc_frozen_strings1 branch, which is now ready for review, testing, and ultimately merging.
This is more of a quick and dirty approach, the correct approach being a restructuring and cleaning of IMCC. This allows us to determine the value of this optimization and reap some benefits before engaging in the higher-cost right answer. I ran into issues with pmcs that are changed after being added to packfiles. This happens in 2 cases: 1) the interp pmc, which is (ab)used to preserve the state required to run a pbc and 2) :immediate :anon magical constant subs. The workaround is that these do not benefit from this optimization and have to store some of their strings inline. On Tue, Apr 27, 2010 at 7:40 AM, Vasily Chekalkin <[email protected]> wrote: > Hello. > > On Tue, Apr 27, 2010 at 9:22 PM, kjstol <[email protected]> wrote: >> chromatic, >> >> just for my understanding (and other lurkers perhaps), you mean that a >> Sub is now stored in the constant table as a Sub PMC, and each of its >> attributes is stored as other constants (mostly STRINGs), and you >> would prefer to make that one blob? Basically, rather than a "graph" >> of constants (root is the Sub PMC and it has indexes to other entries >> in the constant table), it becomes one PMC that represents everything >> the sub needs/has (such as the various names for the sub :flags). Is >> this correct? > > It's other way around. Whole Sub PMC stored as single blob without > using PackFile_ConstTable for attributes. > > -- > Bacek > _______________________________________________ > http://lists.parrot.org/mailman/listinfo/parrot-dev > _______________________________________________ http://lists.parrot.org/mailman/listinfo/parrot-dev
