Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36
Chrome 69
Linux
Desktop
6 years ago
Test name Executions per second
Haversine Classic 223541.7 Ops/sec
Haversine Optimized 590592.6 Ops/sec
Haversine Mine ATan 250097.7 Ops/sec
Haversine Mine ASin 270444.3 Ops/sec
Spherical Law of Cosines 282227.7 Ops/sec
Equirectangular (a little less accurate) 503384.0 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)


;