Skip to content

Instantly share code, notes, and snippets.

@jfirebaugh
Created October 26, 2012 21:32
Show Gist options
  • Save jfirebaugh/3961693 to your computer and use it in GitHub Desktop.
Save jfirebaugh/3961693 to your computer and use it in GitHub Desktop.
<script>
var Test = function () {};
Test.prototype.a = function () {};
Test.prototype.b = function () {};
Test.prototype.c = function () {};
Test.prototype.d = function () {};
Test.prototype.e = function () {};
Test.prototype.f = function () {};
Test.prototype.g = function () {};
Test.prototype.h = function () {};
Test.prototype.i = function () {};
Test.prototype.j = function () {};
Test.prototype.k = function () {};
window.ary = [];
for (var i = 0; i < 10000; ++i) {
ary.push(new Test());
}
</script>
<script>
var Test = function () {
var test = {};
test.a = function () {};
test.b = function () {};
test.c = function () {};
test.d = function () {};
test.e = function () {};
test.f = function () {};
test.g = function () {};
test.h = function () {};
test.i = function () {};
test.j = function () {};
test.k = function () {};
return test;
};
window.ary = [];
for (var i = 0; i < 10000; ++i) {
ary.push(Test());
}
</script>
@jfirebaugh
Copy link
Author

Real-world example from @domenic: jsdom/jsdom#509, fixed by chad3814/CSSStyleDeclaration@33d2ba3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment