[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Another attempt at SpeedingUpStrings
- From: "Javier Guerra" <javier@...>
- Date: Tue, 18 Dec 2007 10:24:20 -0500
On 12/18/07, Asko Kauppi <firstname.lastname@example.org> wrote:
> You can push all the strings in startup on the registry, with light
> userdata pointers (of the C side string constant) serving as keys.
> This will turn string pushing into a table lookup instead; maybe no
> better at all?
yep, that's roughly what i do for functions that might be used in a
tight loop. it means at least one extra table lookup (more if the
'constants' are in a hard-to-find table). after so much stressing of
the high performance of strings management and clever hashing
algorithms, i'll try to benchmark one against the other (hash every
time, vs. table lookup to get the string). who knows, we might be