jquery eval vs windows.execscript eval (v4)

Revision 4 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
window exec script
if (window.execScript) {
    window.execScript(javscriptStr); // eval in global scope for IE
    return null; // execScript doesnt return anything
  }
ready
jquery eval
if (window.open) {  // just to test "if" influence. 
   jQuery.globalEval(javscriptStr);
}
ready

Revisions

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