Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.3 Safari/605.1.15
Safari 12
Mac OS X 10.13.6
Desktop
5 years ago
Test name Executions per second
Haversine Classic 396494.0 Ops/sec
Haversine Optimized 930585.3 Ops/sec
Haversine Mine ATan 472162.9 Ops/sec
Haversine Mine ASin 465649.5 Ops/sec
Spherical Law of Cosines 509985.5 Ops/sec
Equirectangular (a little less accurate) 864646.9 Ops/sec
Script Preparation code:
Tests:
  • Haversine Classic

  • Haversine Optimized

  • Haversine Mine ATan

  • Haversine Mine ASin

  • Spherical Law of Cosines

  • Equirectangular (a little less accurate)


;