argument-assignment-vs-variable-assignment (v3)

Revision 3 of this benchmark created on


Setup

function A(a) {
      a || (a = {});
      return a;
    }
    
    function B(a) {
      var b = a ? a : {};
      return b;
    }
    
    function C(a) {
      var a = a ? a : {};
      return a;
    }
    
    function D(a) {
      a = a ? a : {};
      return a;
    }

Test runner

Ready to run.

Testing in
TestOps/sec
conditional argument assignment
A()
ready
variable assignment
B()
ready
variable reassignment
C()
ready
argument assignment
D()
ready

Revisions

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