From: George H. <ga...@si...> - 2002-10-28 18:35:28
|
In message <200...@dr...>, Joe English writes : > Using a #define to provide two separate implementations depending on : > the platform is a recipe for unmaintainability (I have observed : > this in other parts of the core in relation to other things that : > are optionally defined), a I will only countenance it if there is : > no other way to achieve the effect. There's an improved version of the Tcl hash table in BLT. It will handle both 32 and 64 bit platforms. I've been using it successfully for over a year. : It might be a good idea to use different hash algorithms though; : the best ones are tuned for specific word sizes. HashStringKey : should be "good enough" under any word size, but -- as TIP 69 describes -- : the ONE_WORD_KEY and array hash functions don't do as well : on 64-bit machines. : : Bob Jenkin's state-of-the-art hash functions are word-size specific. I've incorporated Bob Jenkin's hash functions for array hashes. They give good performance for most things. They are much better than the current array hash functions in Tcl. Tcl's string and one-word functions are very good so the only problem was the 64-bit one-word hash. And there I used the code from Knuth. --gah |