Prototype vs Module pattern performance (v72)

Revision 72 of this benchmark created on


Setup

function context() {
       var ins = {};
       ins.prop1 = 'asdasd';
       ins.prop2 = 'asdsad';
       ins.prop3 = 'asdasd';
       ins.prop4 = 'asdasd';
       ins.prop5 = 'sdasd';
       return ins;
    }
    
    function Context() {
       var ins = this;
       ins.prop1 = 'asdasd';
       ins.prop2 = 'asdsad';
       ins.prop3 = 'asdasd';
       ins.prop4 = 'asdasd';
       ins.prop5 = 'sdasd';
    }

Test runner

Ready to run.

Testing in
TestOps/sec
Prototypal
context();
ready
Module pattern
Context();
ready

Revisions

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