Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
round vs trunc vs floor vs parseFloat
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 127
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
round
6.9M/s
trunc
6.8M/s
floor
6.8M/s
parseFloat to int
2.8M/s
View exact numbers
Test name
Executions per second
✓
round
6,856,748 Ops/sec
trunc
6,844,543 Ops/sec
floor
6,809,012 Ops/sec
parseFloat to int
2,813,144 Ops/sec
Tests:
trunc
Math.trunc(13.37) Math.trunc(13.67)
round
Math.round(13.37) Math.round(13.67)
floor
Math.floor(13.37) Math.floor(13.67)
parseFloat to int
parseFloat(12.17.toFixed()) parseFloat(12.97.toFixed())