prop-acces-v-prototype-chain (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script>
  function P() {}
  P.prototype = {
   foo: 'bar'
  }
  
  function PA() {}
  PA.prototype = new P
  
  function PB() {}
  PB.prototype = new PA
  
  function PC() {}
  PC.prototype = new PB
  
  function PD() {}
  PD.prototype = new PC
  
  var p = new P
  var o = {
   a: {
    b: {
     c: {
      d: {
       foo: 'bar'
      }
     }
    }
   }
  }
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
access prototype chain
p.foo > Math.random()
ready
access property
o.a.b.c.d.foo > Math.random()
ready

Revisions

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