storing the hash multiplier instead of the hash value
Daniel Keep
daniel.keep.lists at gmail.com
Mon Mar 22 12:50:43 PDT 2010
How about just *fixing* the hashtable so it doesn't generate false
pointers in the first place? Maybe I'm just strange, but that seems
like a more direct, efficacious solution...
As for the redundancy, I was under the impression that the hash was
cached so make resizing more efficient: if the number of buckets
changes, you have to re-insert all the nodes. If you don't store the
hash, you have to recompute it (which is expensive for anything other
than ints (wherein D laughably 'hashes' by returning the ints value)).
Given that I already think this is a silly way to go about solving the
false pointer issue, I don't see any benefit to doing this other than to
give the CPU something to do while it waits for memory reads.
Sadly, I lack the background to make any sort of objective judgement of
the hash function *itself*, so I'll just reiterate what I've heard
repeated to me over and over again by numerous people: D's builtin hash
function sucks like a black holes.
More information about the Digitalmars-d
mailing list