function name or name = function (v4)

Revision 4 of this benchmark created by Matthew on


Test runner

Ready to run.

Testing in
TestOps/sec
name function
(function() {
                
                function MyConstructor() {
                                // do stuff;
                }
                function MyConstructorDoSomething () {
                                return 'I did something';
                }
                MyConstructor.prototype.doSomething = MyConstructorDoSomething

  var me = new MyConstructor();
  me.doSomething();

}());
 
ready
function name
(function() {
                
                function MyConstructor() {
                                // do stuff;
                }
                MyConstructor.prototype.doSomething = function() {
                                return 'I did something';
                };

  var me = new MyConstructor();
  me.doSomething();

}());
ready

Revisions

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