roxen.lists.pike.general

Subject Author Date
Re: Startup times Pike vs. Perl Stephen R. van den Berg <srb[at]cuci[dot]nl> 17-08-2009
Henrik Grubbstr?m wrote:
>On Mon, 17 Aug 2009, Stephen R. van den Berg wrote:
>>It seems that for every (static) string entering the Pike
>>hashed-string-collection, we do a strlen *and* a memcpy.
>>I'd have guessed that calculating the hash *and* determining the length
>>could be combined, and then the memcpy is not needed anymore because the
>>string is const?  (I haven't looked at the actual Pike source yet).

>The reason for this is that currently the strings have to be reallocated 
>to the data segment, since they are prefixed with writeable data 
>(hash-value, hash-table links, the length, etc). I can think of ways to 
>avoid this, but the question is how happy the C-compilers would be...

Most of this information could be determined at compile time, I guess.
It would depend a bit on how much memory and/or cpu time is used up by
these strings to make it worth our while to try and either move it into
the readonly text segment, or at least into the rss data segment where
most of it can be preinitialised at compile time.
-- 
Sincerely,
           Stephen R. van den Berg.

"God... root...  what's the difference?..."