Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Number vs + vs parseFloat vs Divide
(version: 1)
Comparing performance of:
Number vs Unary + vs parseFloat vs times by 100 and divide
Created:
one year ago
by:
Guest
Jump to the latest result
Tests:
Number
var number = Number(Math.random().toString());
Unary +
var unary = +Math.random().toString();
parseFloat
var parse = parseFloat(Math.random().toString());
times by 100 and divide
var divide = Math.round(Math.random() * 100) / 100
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
Number
Unary +
parseFloat
times by 100 and divide
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0
Browser/OS:
Chrome 131 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Number
3984265.5 Ops/sec
Unary +
5404016.5 Ops/sec
parseFloat
4015968.2 Ops/sec
times by 100 and divide
6911009.0 Ops/sec
Related benchmarks:
Number vs + vs parseFloat
Number vs + vs parseInt
Number vs + vs parseFloat vs parseInt
parseFloat
Number constructor vs unary plus vs parseInt
Number vs + vs parseFloat 23
Parse number removing insignificant digits
Number vs + vs parseFloat + eval
Number vs + vs parseFloat vs Math.Round (round to 2 decimal places)
Comments
Confirm delete:
Do you really want to delete benchmark?