Constant time comparison of two objects.