"~~" or ">>" on Strings (v2)

Revision 2 of this benchmark created by AlK on


Preparation HTML

<script>
  var hex = '0xff2200';
  var num = 0xff2200;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
>>
hex >> 0;
ready
~~
~~hex;
ready
>>>
hex >>> 0;
ready
*1
hex * 1;
ready
Number()
Number(hex);
ready
parseInt();
parseInt(hex, 10);
ready
num >>
num >> 0;
ready
~~num
~~num;
ready
+hex
+hex;
ready

Revisions

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