if vs bool for var allocation

Benchmark created by vor on


Description

simple confirmation (at least for ie 9)

Preparation HTML

<script>
  var bool = true,
      res;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
if structured
if (bool) {
 res = bool;
}
ready
if simple
if (bool) res = bool;
ready
boolean
bool && (res = bool);
ready

Revisions

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