Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Max.max & Math.min vs sort
Checking to see if Math.max/min on a tuple is faster then tuple.sort
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/116.0.0.0 Safari/537.36
Browser:
Chrome 116
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
sort
3189142.5 Ops/sec
max/min
325112.0 Ops/sec
Tests:
sort
const larger = 10; const smaller = 5; [larger, smaller].sort((a,b) => b - a);
max/min
const larger = 10; const smaller = 5; [Math.max([smaller, larger]), Math.min([smaller, larger])];