Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36
Chrome 66
Mac OS X 10.13.4
Other
6 years ago
Test name Executions per second
Haversine Classic 342028.9 Ops/sec
Haversine Optimized 894319.6 Ops/sec
Haversine Mine ATan 394930.6 Ops/sec
Haversine Mine ASin 431382.2 Ops/sec
Spherical Law of Cosines 456178.6 Ops/sec
Equirectangular (a little less accurate) 746422.6 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)


;