performance testing of named or anonymous functions (v26)

Revision 26 of this benchmark created on


Description

a small comparision betwean named function and function declaration

Test runner

Ready to run.

Testing in
TestOps/sec
anonymous
function a(){
  function t(){};
  return { t: t};
}
for (var i = 0; i < 10000; ++i) {
  var _a = a(); _a.t();
}
ready
function expression
function a(){
}
a.prototype.t = function(){}

for (var i = 0; i < 10000; ++i) {
  var _a = new a(); _a.t();
}
ready

Revisions

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