Casting-type (v6)

Revision 6 of this benchmark created by Gerald on


Description

Changed Test 1 so that x = '2'. The original test's x = 's' evaluates to NaN which is not equitable to Test 2's x = 2 assignment.

Test runner

Ready to run.

Testing in
TestOps/sec
string to integer
var x = '2',
    y = 5;

x = parseInt(x, 10);
x + y;
ready
integer
var x = 2,
    y = 5;

x + y;
ready

Revisions

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