On Apr 19, 2004, at 2:25 AM, Leopold Toetsch wrote:

We still can precalculate for these constant strings and save some extra
cylces (the precalculated value isn't used yet, but ...) And we can
precalculate hash values for the string constants in the constant table
during compilation (and write it into the PBC).

So the tradeoff there is that in the case of run-from-source it may be a slowdown (since we'll calculate hash values of some strings which may not be ever used as hash keys or lookup keys), but we can detect how we are running, and only calculate them if we are writing out byte code, so that should be a win.


We'll be in trouble if we ever change the hash algorithm, if we're freezing the result into PBC. So we should probably have something in the signature, so that if we detect that the algorithm may have changed, we ignore what's in the PBC, and fall back to cache-on-demand.

JEff

Reply via email to