On 08/06/2013 03:15 AM, Nicholas Clark wrote: > On Mon, Aug 05, 2013 at 10:32:55PM -0600, Karl Williamson wrote: >> On 08/05/2013 05:28 PM, Jarkko Hietaniemi wrote: >>>>> >>>>> alnum 1132 >>>>> alpha 1080 >>>>> graph 1088 >>>>> lower 1236 >>>>> print 1082 >>>>> punct 272 >>>>> upper 1220 >>>>> cased 238 (used internally, a combination of lower + upper) >>> >>> Of that list I think only lower and upper are likely to be widely used, >>> but that's just my off-the-cuff guess. >>> >>> More concretely speaking: can you easily try precompiling *all* of those >>> and seeing how much the data section grows in size, compared with having >>> just the \d and \w precompiled? It would be easier to weigh things with >>> some idea of the actual footprint. >>> >>> >> >> The data section should not grow at all since these are const UV[] const. > > Shifting data from runtime and hence increasing the size of the read only > section of the perl executable doesn't trouble me. The opposite in fact > > 1) it ought to be shared between running perl processes, whereas anything > dynamically loaded won't, hence moving things in that direction will cut > total system memory usage > 2) it ought not be loaded until needed (at least, if the OS does demand > paging) > > In which case > >> Here is the output of size(1) on a perl on my system: >> text data bss dec hex filename >> just \w,\d 4052905 6768 296 4059969 3df341 perl >> everything 4111977 6768 296 4119041 3eda01 perl >> ------- >> used 59072 >> >> If we did use everything, there would be some savings from code being >> able to be ripped out that does different things depending on whether >> the full definition is available at compile time or not. > > I think "all of them". > > Unless there is some other good reason not to. > > But it seems to be a win-win - more memory shared between perl processes, > and less code. Oh, and less work done at runtime? > > Nicholas Clark > Now done with merge commit 1a8709f4ae348ec199d2eb28be5d03138c391e47 (I should have put into that commit message info about memory sharing, etc. that you talk about above)Thread Previous | Thread Next