|
On 04/01/2012 4.17, Miles Bader wrote:
An "all characters" hash is not free, especially for_very_ long strings (I regularly handle 500MB strings), and the benefit of such a change needs to be weighed against the costs, weighted by the likelihood of each case. [This is especially true on less performant hardware, and I think Lua is much more frequently used on such platforms compared to more bloated/weighty languages like Python, Ruby, etc.]
Perhaps an option to set the hash function (as we can set the allocator), or just a definition in luaconf.h to the same effect, could be in line with the Lua way of doing things.
-- Enrico