Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
round vs trunc vs floor (2)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Browser:
Chrome 133
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
round
258.7M/s
floor
243.3M/s
trunc
241.1M/s
View exact numbers
Test name
Executions per second
✓
round
258,677,504 Ops/sec
floor
243,322,448 Ops/sec
trunc
241,060,112 Ops/sec
Tests:
trunc
Math.trunc(13.37123123 * 1_000_000) / 1_000_000 Math.trunc(13.67123123 * 1_000_000) / 1_000_000
round
Math.round(13.37123123, 6) Math.round(13.67123123, 6)
floor
Math.floor(13.37123123, 6) Math.floor(13.67123123, 6)