new Function vs windows.execscript eval (v6)

Revision 6 of this benchmark created on


Description

Performance measurement between new Function and windows execute script eval.

Preparation HTML

<html>
<head>
</head>
<body>
</body>

</html>
<script>
  var javscriptStr = "var a=3,b=789378437;c=(a+b)/34566;"
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
new Function
return (new Function(javscriptStr))() || null;
ready
execScript
if (window.execScript) {
    window.execScript(javscriptStr); // eval in global scope for IE
    return null; // execScript doesnt return anything
  }
ready

Revisions

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