[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re[2]: Max length of string keys in hash tables
- From: Bulat Ziganshin <bulat.ziganshin@...>
- Date: Fri, 30 Apr 2010 23:00:16 +0400
Hello Luiz,
Friday, April 30, 2010, 10:44:07 PM, you wrote:
> That's not how it works. For strings of length less than 32, all bytes
> are visited. For longer strings, only every k bytes are visited, where
k = (l>>>5)+1 and is the length. See luaS_newlstr in
btw, it may be rather meaningless :) if string isn't in L2 cache
then L2 cache line typically is 64 bytes long so accessing every 32'th
byte means accessing every memory line and this needs about the same
time as computations required to compute hash value
--
Best regards,
Bulat mailto:Bulat.Ziganshin@gmail.com