explicit vs implicit conversion (v4)

Revision 4 of this benchmark created on


Description

compares conversion methods

Setup

var x = "3";

Test runner

Ready to run.

Testing in
TestOps/sec
implicit
if (x == 3) {};
ready
explicit
if (parseInt(x) === 3) {};
ready
explicit 2
x = parseInt(x);
if (x === 3) {};
ready

Revisions

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