Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1
Mobile Safari 17
iOS 17.0
Mobile
one year ago
Test name Executions per second
Haversine Classic 1253957.2 Ops/sec
Haversine Optimized 2931407.5 Ops/sec
Haversine Mine ATan 1352276.5 Ops/sec
Haversine Mine ASin 1455701.2 Ops/sec
Spherical Law of Cosines 1523073.5 Ops/sec
Equirectangular (a little less accurate) 2161168.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)


;