function vs Function (v3)

Revision 3 of this benchmark created on


Preparation HTML

<script>
  var f1 = function() {
   var x = 1;
   console.log('1');
  }
  
  var f2 = new Function('var x = 1;console.log("2");')
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
function(){}
f1();
ready
new Function
f2();
ready

Revisions

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