Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Number() vs parseInt() from string
(version: 1)
VS
Comparing performance of:
Number vs parseInt
Created:
one month ago
by:
Guest
Go to the latest result
Script Preparation code:
function test1() { return Number('1234567890.0123456789') } function test2() { return parseInt('1234567890.0123456789') }
Tests:
Number
test1();
parseInt
test2();
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Number
parseInt
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one month ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0
Browser/OS:
Firefox 151 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Number
2840.9M/s
parseInt
2762.0M/s
View exact numbers
Test name
Executions per second
✓
Number
2,840,863,232 Ops/sec
parseInt
2,762,032,384 Ops/sec
Related benchmarks
parse vs plus vs number
Number() vs parseInt()
Number() vs Number.parseInt() vs parseInt()
parseInt() vs Number()
Comments
Confirm delete:
Do you really want to delete benchmark?