I\'m looking for the fastest way to determine if a long value is a perfect square (i.e. its square root is another integer):
long
If speed is a concern, why not partition off the most commonly used set of inputs and their values to a lookup table and then do whatever optimized magic algorithm you have come up with for the exceptional cases?