Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Math.floor vs parseInt against number type
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:148.0) Gecko/20100101 Firefox/148.0
Browser:
Firefox 148
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
4 months ago
parseInt
1578.2M/s
Math.floor
1569.2M/s
View exact numbers
Test name
Executions per second
✓
parseInt
1,578,186,368 Ops/sec
Math.floor
1,569,249,024 Ops/sec
Script Preparation code:
let number = Math.random();
Tests:
Math.floor
let floor = Math.floor(number);
parseInt
let parse = parseInt(number);