Run details:
Mozilla/5.0 (Linux; Android 7.1.1; CPH1725) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Mobile Safari/537.36
Chrome Mobile 74
Android 7.1.1
Mobile
5 years ago
Test name Executions per second
Haversine Classic 42823.6 Ops/sec
Haversine Optimized 103385.6 Ops/sec
Haversine Mine ATan 45283.8 Ops/sec
Haversine Mine ASin 51312.9 Ops/sec
Spherical Law of Cosines 45079.4 Ops/sec
Equirectangular (a little less accurate) 66538.7 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)


;