Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36
Chrome 79
Mac OS X 10.15.2
Desktop
4 years ago
Test name Executions per second
Haversine Classic 572317.8 Ops/sec
Haversine Optimized 1437657.5 Ops/sec
Haversine Mine ATan 670036.0 Ops/sec
Haversine Mine ASin 711843.8 Ops/sec
Spherical Law of Cosines 753896.5 Ops/sec
Equirectangular (a little less accurate) 1188623.4 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)


;