function vs Function (v13)

Revision 13 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
function(){}
var f1 = new function() {
 var x = 1;
 var obj = this;
 obj.init = function(){console.log('1');}
}
ready
new Function
var f2 = function(){
   var x = 1;
   var obj = this;
   obj.init = function(){console.log('1');}
   return obj;
}();
ready

Revisions

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