Permalink
Browse files

Performance Gains from passing globals to closures

  • Loading branch information...
1 parent 187798a commit a7cbd5c84caf91abcf595add00de1937e6763b38 @mwoods79 committed Apr 11, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 README.md
View
@@ -54,6 +54,12 @@ Javascript.
console.log("I get ran immidiately");
})();
+ // Small performance gain by passing in globals to closures
+ (function($){
+ console.log($);
+ })(jQuery);
+ // Do this thousands of times, woot!!
+
2 Returning or Exporting
// Returning Object Literals
@@ -83,3 +89,4 @@ Javascript.
})();
new myModule();
+

0 comments on commit a7cbd5c

Please sign in to comment.