Created
July 11, 2012 07:58
-
-
Save develar/3088841 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var b3 = function (f, self) { | |
return function () { | |
return f.call(self) | |
} | |
}; | |
var o = {}; | |
var a = new Array(10000); | |
// 1 | |
for (var i = 0; i < 10000; i++) { | |
a[i] = b3(function () { | |
this.timeoutId = -1; | |
}, o); | |
} | |
// 2 | |
for (var i = 0; i < 10000; i++) { | |
a[i] = (function $fun() { | |
$fun.o.timeoutId = -1; | |
}); | |
a[i].o = o; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment