Function Declarations vs. Function Expressions (v4)

Revision 4 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Function Declaration
function X() { return "hello"; }
function Y() { return X(); }
function Z() { return Y(); }
Z();
ready
Function Expression
var X = function () { return "hello"; };
var Y = function () { return X(); };
var Z = function () { return Y(); };
Z();
ready
Both
var X = function X() { return "hello"; };
var Y = function Y() { return X(); };
var Z = function Z() { return Y(); };
Z();
ready

Revisions

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