fn-expression-vs-statement (v27)

Revision 27 of this benchmark created on


Setup

function fn1() {};
    
    var fn2 = function() {};
    
    var fn3Builder = function() {};
    
    var fn3 = new fn3Builder();
    
    fn3Builder.prototype.init = function() {};
    
    var fn4Builder = function() {
      this.init = function(){}
    };
    
    var fn4 = new fn4Builder();

Test runner

Ready to run.

Testing in
TestOps/sec
Expression
fn1();
ready
Statement
fn2();
ready
Constructor
fn3.init();
ready
Constructor
fn4.init();
ready

Revisions

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