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/135.0.0.0 Safari/537.36
Browser:
Chrome 135
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
sort
17409750.0 Ops/sec
max/min
3304274.2 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])];