Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Chrome 55
Windows 7
Other
2025 years ago
Test name Executions per second
Haversine Classic 243694.7 Ops/sec
Haversine Optimized 589175.8 Ops/sec
Haversine Mine ATan 263328.8 Ops/sec
Haversine Mine ASin 299500.8 Ops/sec
Spherical Law of Cosines 298503.2 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)


;