A much better hash function would be to just reinterpret the bit
pattern in the float as an integer, I think. Maybe xor'ing the high
and low ends if the floats are longer than INT32 (which they typically
are on 64 bit architectures).

Don't know if it could be a compat problem changing it though.
Strictly speaking it shouldn't be, considering the doc for hash_value,
but that's not necessarily the end of the story.
              • ... Arne Goedeke
              • ... Martin Stjernholm, Roxen IS @ Pike developers forum
              • ... Arne Goedeke
              • ... Arne Goedeke
              • ... Martin Stjernholm, Roxen IS @ Pike developers forum
              • ... Arne Goedeke
              • ... Peter Bortas @ Pike developers forum
              • ... Arne Goedeke
              • ... Peter Bortas @ Pike developers forum
              • ... Mirar @ Pike developers forum
  • float hashing Martin Stjernholm, Roxen IS @ Pike developers forum

Reply via email to