toggle vs assign (v3)

Revision 3 of this benchmark created on


Description

compare toggling a boolean with assigning it

Preparation HTML

<script>
  var a = true;
  var b = false;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Toggle - Bool
a = !a;
b = !b
ready
Assign - boolean
a=false;
b=true;
ready

Revisions

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