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
parseInt
1146.0M/s
bitwise or
1097.5M/s
bitwise invert2
1095.5M/s
trunc
1083.9M/s
Round
1082.0M/s
floor
1060.1M/s
View exact numbers
Test name
Executions per second
✓
parseInt
1,146,045,056 Ops/sec
bitwise or
1,097,483,648 Ops/sec
bitwise invert2
1,095,457,280 Ops/sec
trunc
1,083,864,960 Ops/sec
Round
1,081,994,752 Ops/sec
floor
1,060,147,136 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)