Functionobjecttest

JavaScript performance comparison

Test case created by Stefan New

Preparation code


      
      <script>
Benchmark.prototype.setup = function() {
  const nestedObject = {
    someInnerObject: {
      someInnerObject2: {
        someInnerObject3: {
          someInnerObject4: {
            someInnerObject5: {
              someInnerObject6: {
                foo: 'bar'
              }
            }
          }
        }
      }
    }
  };
  
  const unnestedObject = {
    foo: 'bar',
    bar: 'foo',
    baz: 'quux',
    quux: 'baz'
  }
  
  const returnObject = object => object;

};
</script>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
Nested
returnObject(nestedObject);
pending…
Un-nested
returnObject(unnestedObject);
pending…

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

0 Comments