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 331600.0 Ops/sec
Haversine Optimized 876632.1 Ops/sec
Haversine Mine ATan 357608.0 Ops/sec
Haversine Mine ASin 423429.2 Ops/sec
Spherical Law of Cosines 451387.5 Ops/sec
Equirectangular (a little less accurate) 757945.1 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)


;