Shorten scope lookup (v4)

Revision 4 of this benchmark created by Alireza on


Description

Add case outside of closure.

Preparation HTML

<script>
  (function() {
   window.a = function() {
    window.aa = 1;
   };
  })(window);
  
  (function(window) {
   window.b = function() {
    window.bb = 1;
   };
  })(window);

  c = function() {
var $=window;
   $.cc = 1;
  };
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Don't copy window
a();
ready
Copy window
b();
ready
No closure
c();
ready

Revisions

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