Prototype Chain: Short vs Long

Benchmark created on


Setup

x = function(){}
    x.prototype.a = 1
    y = function(){}
    y.prototype = new x
    z = function(){}
    z.prototype = new z
    
    longchain = new z
    
    short = function(){}
    short.prototype.a = 1
    
    shortchain = new short

Test runner

Ready to run.

Testing in
TestOps/sec
Long Chain
longchain.a
ready
Short Chain
shortchain.a
ready

Revisions

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