Take a look here:
Look at the first DEMO there.
That code is very efficient. It does *NOT* use the haversine formula, but it is accurate to within perhaps 100 meters for distances up to 200 km. If that is good enough for you, then you don't need to use haversine formula.