checking value worthwhile?

Benchmark created on


Preparation HTML

<script>
  var i = 0;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
check before setting
for (var j=0; j<10000; j++)
  if (!i) i = 1;
ready
always set
for (var j=0; j<10000; j++)
  i ^= 1;
ready

Revisions

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