String to Number

Benchmark published by System on

Description

Converting strings to numbers.

Setup

const str = '12345.6789';

Test Runner

Initializing...

Testing in
Test CaseOps/sec
Number(str)
Number(str);
ready
parseInt(str)
parseInt(str, 10);
ready
parseFloat(str)
parseFloat(str);
ready
+str
+str;
ready

Revisions

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

Revision 1
publishedby Systemon