Re[2]: [Haskell-cafe] String Hashing

2007-06-19 Thread Bulat Ziganshin
Hello Jan-Willem, Tuesday, June 19, 2007, 1:17:25 AM, you wrote: table is the right structure to begin with? I fell back on much- simpler multiplicative hashing schemes for Data.HashTable. A btw, are you seen http://isthe.com/chongo/tech/comp/fnv/ ? he suggest to use non-zero value as

Re: [Haskell-cafe] String Hashing

2007-06-18 Thread Jan-Willem Maessen
On Jun 17, 2007, at 9:55 PM, Thomas Conway wrote: Hi All, I'm trying to figure out how to maximum performance out of one of my inner loops which involves string hashing. ... mix :: Triple - Triple This looks like a version of the Bob Jenkins hash function from burtleburtle.net. I

Re: [Haskell-cafe] String Hashing

2007-06-18 Thread Thomas Conway
On 6/19/07, Jan-Willem Maessen [EMAIL PROTECTED] wrote: This looks like a version of the Bob Jenkins hash function from burtleburtle.net. I implemented the 32-bit version of this as follows: Indeed. It's the 64-bit version. 32 bits is oh-so-last-century. ;-) mix :: Int32 - Int32 - Int32 -

[Haskell-cafe] String Hashing

2007-06-17 Thread Thomas Conway
Hi All, I'm trying to figure out how to maximum performance out of one of my inner loops which involves string hashing. Consider the following hash function, which is a transliteration of a good one written in C: --8x--8x--8x--8x--8x--8x--8x--8x--8x module HashStr where import Data.Bits

Re: [Haskell-cafe] String Hashing

2007-06-17 Thread Stefan O'Rear
On Mon, Jun 18, 2007 at 11:55:05AM +1000, Thomas Conway wrote: Hi All, I'm trying to figure out how to maximum performance out of one of my inner loops which involves string hashing. Consider the following hash function, which is a transliteration of a good one written in C: [ Code elided

Re: [Haskell-cafe] String Hashing

2007-06-17 Thread Thomas Conway
FWIW, here's a link to the original c code: http://www.burtleburtle.net/bob/hash/evahash.html -- Dr Thomas Conway [EMAIL PROTECTED] Silence is the perfectest herald of joy: I were but little happy, if I could say how much. ___ Haskell-Cafe mailing