function vs Function v2 (v14)

Revision 14 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
function(){}
var f1 = function() {
    var x = 1;
    console.log(x);
    }


f1();
ready
new Function
var f2 = new Function('var x = 2;console.log(x);')

f2();
ready
object
var f3 = {};
f3.x = 3;
console.log(f3.x);
ready
object2
var f4 = {};
f4['x'] = 4;
console.log(f4['x']);
ready

Revisions

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