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 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Browser:
Chrome 132
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
floor
114.1M/s
trunc
113.0M/s
round
111.5M/s
parseFloat to int
3.2M/s
View exact numbers
Test name
Executions per second
✓
floor
114,128,080 Ops/sec
trunc
113,045,104 Ops/sec
round
111,450,176 Ops/sec
parseFloat to int
3,225,609 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())