Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Math.atan2(...arr) v. Math.atan2(arr[0], arr[1])
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 OPR/126.0.0.0 (Edition developer)
Browser:
Opera 126
Operating system:
Windows
Device Platform:
Desktop
Date tested:
4 months ago
Test name
Executions per second
...arr
156.4 Ops/sec
arr[0], arr[1]
300.9 Ops/sec
Script Preparation code:
var numbers = Array(100000).fill(null).map(x => [Math.random()*100, Math.random()*100])
Tests:
...arr
numbers.forEach(x => Math.atan2(...x));
arr[0], arr[1]
numbers.forEach(x => Math.atan2(x[0], x[1]));