Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
simple Math.max vs ternary
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:139.0) Gecko/20100101 Firefox/139.0
Browser:
Firefox 139
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
ternary
807231680.0 Ops/sec
Math.max
1139495808.0 Ops/sec
Script Preparation code:
var a = Math.round(Math.random()*1000),b = Math.round(Math.random()*1000),c;
Tests:
ternary
c = a>b?a:b;
Math.max
c = Math.max(a,b);