Coercion vs Casting (v11)

Revision 11 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Coercion
~~'50';
ready
parseInt
parseInt('50', 10);
ready
parseInt (without radix)
parseInt('50');
ready
Bit shift
'50' >> 0;
ready
Math.floor
Math.floor('50');
ready
Alternate bit shift
'50' | 0
ready
Number
Number('50')
ready

Revisions

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