jquery eval vs windows.execscript eval (v5)

Revision 5 of this benchmark created on


Description

Performance measurement between jquery eval and windows execute script eval.

Preparation HTML

<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
</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
execScript vs Function
if (window.execScript) {
    window.execScript(javscriptStr); // eval in global scope for IE
    return null; // execScript doesnt return anything
  }
return (new Function(javscriptStr))() || null;
ready
jquery eval
jQuery.globalEval(javscriptStr);
ready

Revisions

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