Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
parseInt() VS x.toFixed()
Compare javascript native parseInt() function vs toFixed() function
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Browser:
Firefox 128
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Round floating number using parseInt()
202729.8 Ops/sec
Round floating number using toFixed()
934.9 Ops/sec
Tests:
Round floating number using parseInt()
for (var i = 0; i < 10000; i++) { parseInt(i) }
Round floating number using toFixed()
for (var i = 0; i < 10000; i++) { +i.toFixed() }