On Sat, Mar 24, 2012 at 07:49:13AM -0600, Andrei Alexandrescu wrote: > On 3/23/12 10:47 PM, Andrej Mitrovic wrote: > >On 3/24/12, Andrej Mitrovic<[email protected]> wrote: > >>snip > > > >I've managed to test the hashes on a small-sized closed-source > >project (9K lines) which used hashes a lot. I've found no issues so > >far (no memory corruption or anything). Performance did drop a bit > >from 812msecs to 898msecs. I can't extensively test this yet because > >I can't serialize the hashes (a serialization library doesn't want to > >work with the new hashes but I'll fix that) and so I need a 30second > >run that first fills the hashes before doing work on them. But it > >does seem to be a tiny bit slower. > > I wonder what the matter is. What hashing function does the new hash > use? Let me reiterate the suggestion that different hash algorithms > are used depending on the string length. [...]
I used the same hashing functions as before. Of course, I did move things around a bit, so some stuff may have gotten shuffled around unwittingly. The only actual difference in hash function that I'm aware of is with const(char)[], which in the present druntime is inconsistent with char[] and string. But this can't be the source of the problem, because, if anything, the hash function I substituted (which is the same as that for char[] and string currently) should be *faster*. T -- There are four kinds of lies: lies, damn lies, and statistics.
