Eval vs new Function vs function() (v8)

Revision 8 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Eval
eval('(function(test) { return test.a; })')({test: false})
ready
new Function
(new Function('test', 'return test.a;'))({test: false})
ready
function
(function(test) {
  return test.a
})({test: false})
ready

Revisions

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