if one line vs brackets

Benchmark created by Cole Lawrence on


Setup

var test = Math.random() < .5;
    function yes () {}

Test runner

Ready to run.

Testing in
TestOps/sec
if brackets
if (test) {
yes()
}
ready
if no brackets
if (test) yes()
ready

Revisions

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

  • Revision 1: published by Cole Lawrence on
  • Revision 2: published on