Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Round vs Others2
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Android 14; Mobile; rv:135.0) Gecko/135.0 Firefox/135.0
Browser:
Firefox Mobile 135
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
trunc
1083864960.0 Ops/sec
floor
1060147136.0 Ops/sec
parseInt
1146045056.0 Ops/sec
bitwise invert2
1095457280.0 Ops/sec
bitwise or
1097483648.0 Ops/sec
Round
1081994752.0 Ops/sec
Script Preparation code:
var num = Math.random() * 100;
Tests:
trunc
Math.trunc(num);
floor
Math.floor(num);
parseInt
parseInt(num);
bitwise invert2
~~(num);
bitwise or
num | 0
Round
Math.round(num)