Eval vs new Function vs function() (v4)

Revision 4 of this benchmark created on


Test runner

Ready to run.

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

Revisions

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