I am implementing a table hash 
(http://en.wikipedia.org/wiki/Tabulation_hashing) and noticed that a table 
hash using a table of 31-bit unsigned integers is almost an order of 
magnitude faster than a table hash using a table of 32-bit unsigned 
integers.

The former has an average hash time of 0.00007ms per 20 byte key for a 
31-bit hash, and the latter has an average hash time of 0.00034ms per 20 
byte key for a 32-bit hash.

I figured that XOR on 8-bit integers would be faster than XOR on 16-bit 
integers would be faster than XOR on 24-bit integers would be faster than 
XOR on 32-bit integers, but did not anticipate such a difference between 
31-bit and 32-bit integers.

Is there something regarding XOR that I may be missing that could explain 
the difference?


-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to