[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Hash Table Collisions (n.runs-SA-2011.004)
- From: Leo Razoumov <slonik.az@...>
- Date: Fri, 6 Jan 2012 13:52:27 -0500
On Fri, Jan 6, 2012 at 10:41, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
> If I understood the problem correctly, a variable hash seed would
> solve it, except for the skipping of characters. So, one approach
> is to implement strings using two variants: short strings (up to
> 32 bytes) and long strings.
>
If I am not mistaken current Lua implementation computes hash value by
iterating through a string one character at a time. Would it be faster
to iterate one word at a time (4 bytes at a time in 32bit
architecture)? It will require changing hash function implementation
but it could speed up the calculations. Hopefully, we can still treat
127-byte long strings as short strings.
--Leo--
- References:
- Re: Hash Table Collisions (n.runs-SA-2011.004), Vladimir Protasov
- Re: Hash Table Collisions (n.runs-SA-2011.004), Leo Razoumov
- Re: Hash Table Collisions (n.runs-SA-2011.004), Vladimir Protasov
- Re: Hash Table Collisions (n.runs-SA-2011.004), Miles Bader
- Re: Hash Table Collisions (n.runs-SA-2011.004), Ashwin Hirschi
- Re: Hash Table Collisions (n.runs-SA-2011.004), Miles Bader
- Re: Hash Table Collisions (n.runs-SA-2011.004), David Kolf
- Re: Hash Table Collisions (n.runs-SA-2011.004), Miles Bader
- Re: Hash Table Collisions (n.runs-SA-2011.004), Alexander Gladysh
- Re: Hash Table Collisions (n.runs-SA-2011.004), Roberto Ierusalimschy
- Re: Hash Table Collisions (n.runs-SA-2011.004), Roberto Ierusalimschy