ternary operator vs. if statement (v12)

Revision 12 of this benchmark created on


Setup

var x;

Test runner

Ready to run.

Testing in
TestOps/sec
ternary operator (true case)
x = (x === true ? false : true);
ready
if statement (true case)
if (x === true) x = false; else x = true;
ready

Revisions

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