Default value

Benchmark created by Alex Chao on


Setup

var ifFn = function(obj) {
      if (!obj) obj = {};
    };
    
    var orFn = function(obj) {
      obj = obj || {};
    };

Test runner

Ready to run.

Testing in
TestOps/sec
if-with-argument
ifFn({});
ready
if-without-argument
ifFn();
ready
or-with-argument
orFn({});
ready
or-without-argument
orFn();
ready

Revisions

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

  • Revision 1: published by Alex Chao on