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:
one month ago
Test name
Executions per second
Math.floor
1569249024.0 Ops/sec
parseInt
1578186368.0 Ops/sec
Script Preparation code:
let number = Math.random();
Tests:
Math.floor
let floor = Math.floor(number);
parseInt
let parse = parseInt(number);