I decided to go for long when I was trying to add good hashcode() to a LongPair. Thats expensive if x,y are not completely unrelated but are not so different. Standard hashcode which just XOR x and y are pretty bad when x is similar to y (hashcodes have only few binary '1' and therefore we have a lot of collisions). And while I was trying hashcodes like x^somePrime+y I knew that this will loose the performance battle. So I switched to squeezing into longs and get around the problem of having to write good hashcodes.