Script Preparation code:
Tests:

Historical Performance Data aggregated from 44 community runs

Desktop Results:
Chrome 25 runs
fast approx. atan2
1.7M/s
cached Math.atan2
1.5M/s
Math.atan2
1.1M/s

Fastest: fast approx. atan2 (1.5x faster)

View exact numbers
  • fast approx. atan2: 1,669,946 ops/sec
  • cached Math.atan2: 1,504,007 ops/sec
  • Math.atan2: 1,137,601 ops/sec
Firefox 13 runs
fast approx. atan2
2.8M/s
cached Math.atan2
2.6M/s
Math.atan2
2.3M/s

Fastest: fast approx. atan2 (1.2x faster)

View exact numbers
  • fast approx. atan2: 2,837,684 ops/sec
  • cached Math.atan2: 2,560,304 ops/sec
  • Math.atan2: 2,305,402 ops/sec
Mobile Results:
Chrome 6 runs
fast approx. atan2
847K/s
cached Math.atan2
761K/s
Math.atan2
582K/s

Fastest: fast approx. atan2 (1.5x faster)

View exact numbers
  • fast approx. atan2: 846,816 ops/sec
  • cached Math.atan2: 761,138 ops/sec
  • Math.atan2: 582,132 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Math.atan2
    fast approx. atan2
    cached Math.atan2

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 months ago)
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Mobile Safari/537.36
Chrome Mobile 148 on Android
View result in a separate tab
fast approx. atan2
4.3M/s
cached Math.atan2
3.2M/s
Math.atan2
3.1M/s
View exact numbers
Test name Executions per second
fast approx. atan2 4,349,316 Ops/sec
cached Math.atan2 3,189,924 Ops/sec
Math.atan2 3,092,531 Ops/sec