parse number

Benchmark created on


Setup

arr=[];
for (i=1; i<1000; i++) arr[i] = ""+(i*i);

Test runner

Ready to run.

Testing in
TestOps/sec
parseFloat
arr.reduce((acc,val) => acc + parseFloat(val), 0)
ready
parseInt
arr.reduce((acc,val) => acc + parseInt(val), 0)
ready
Number
arr.reduce((acc,val) => acc + Number(val), 0)
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.