Here's a sick and twisted idea for doing faster hashing. Have a separate hash table for ints and floats. It takes up more memory, but then you don't have to worry about converting everything to a common hash format. :)