lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> So, can makes long string just using a few of bytes to calculate hash
> value? using a random seed to choose how to skip bytes? this will be
> better.

Yes, that may be a good idea. But note that the proposal has two 
different things (that maybe we should have tried separately).

One is the hash using all bytes; that may not be really necessary.

The other is the change to not internalize all strings. This may be
(and that is a big question) good by itself. Interning has its own
price. People that are complaining about the "high cost" of indexing
with long strings in this proposal maybe do not realise that currently,
*ALL* strings pay roughly that price just to be created. (To intern a
string, Lua hashes a non-internalized string!)

-- Roberto