Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Math.floor Vs parseInt (random and fixed)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/126.0.6478.153 Mobile/15E148 Safari/604.1
Browser:
Chrome Mobile iOS 126
Operating system:
iOS 17.6
Device Platform:
Mobile
Date tested:
one year ago
parseInt - fixed
19.1M/s
Math.floor - fixed
18.7M/s
parseInt
10.4M/s
Math.floor
10.1M/s
View exact numbers
Test name
Executions per second
✓
parseInt - fixed
19,107,810 Ops/sec
Math.floor - fixed
18,730,416 Ops/sec
parseInt
10,384,760 Ops/sec
Math.floor
10,080,236 Ops/sec
Tests:
parseInt
parseInt(Math.random() * 100, 10)
Math.floor
Math.floor(Math.random() * 100)
parseInt - fixed
parseInt(123456789, 10)
Math.floor - fixed
Math.floor(123456789)