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/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Browser:
Chrome 129
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
bitwise invert2
224.1M/s
bitwise or
212.3M/s
floor
190.7M/s
Round
185.7M/s
trunc
181.8M/s
parseInt
147.3M/s
View exact numbers
Test name
Executions per second
✓
bitwise invert2
224,102,464 Ops/sec
bitwise or
212,282,240 Ops/sec
floor
190,714,704 Ops/sec
Round
185,658,032 Ops/sec
trunc
181,807,600 Ops/sec
parseInt
147,287,680 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)