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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15
Browser:
Safari 18
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
floor
528.7M/s
parseInt
510.8M/s
bitwise invert2
508.5M/s
bitwise or
496.6M/s
trunc
476.7M/s
Round
475.3M/s
View exact numbers
Test name
Executions per second
✓
floor
528,718,944 Ops/sec
parseInt
510,750,848 Ops/sec
bitwise invert2
508,538,688 Ops/sec
bitwise or
496,610,592 Ops/sec
trunc
476,706,592 Ops/sec
Round
475,278,464 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)