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 (X11; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0
Browser:
Firefox 134
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
bitwise or
542.9M/s
bitwise invert2
539.6M/s
floor
519.3M/s
trunc
503.2M/s
parseInt
490.2M/s
Round
482.5M/s
View exact numbers
Test name
Executions per second
✓
bitwise or
542,910,976 Ops/sec
bitwise invert2
539,633,472 Ops/sec
floor
519,294,112 Ops/sec
trunc
503,185,760 Ops/sec
parseInt
490,198,080 Ops/sec
Round
482,515,968 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)