зеркало из https://github.com/mozilla/gecko-dev.git
Bug 489636 - Add a GC u-bench test for property tree splitting via deletion; r=sfink
--HG-- extra : rebase_source : 2e7e21e4a634e348fa584fb1f2514ddffb069a19
This commit is contained in:
Родитель
10b3355fe8
Коммит
c8e1859f04
|
@ -0,0 +1,25 @@
|
|||
window.tests.set('propertyTreeSplitting', (function() {
|
||||
var garbage = [];
|
||||
var garbageIndex = 0;
|
||||
return {
|
||||
description: "use delete to generate Shape garbage",
|
||||
load: (N) => { garbage = new Array(N); },
|
||||
unload: () => { garbage = []; garbageIndex = 0; },
|
||||
makeGarbage: (N) => {
|
||||
function f()
|
||||
{
|
||||
var a1 = eval;
|
||||
delete eval;
|
||||
eval = a1;
|
||||
var a3 = toString;
|
||||
delete toString;
|
||||
toString = a3;
|
||||
}
|
||||
for (var a = 0; a < N; ++a) {
|
||||
garbage[garbageIndex++] = new f();
|
||||
if (garbageIndex == garbage.length)
|
||||
garbageIndex = 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
})());
|
|
@ -20,6 +20,7 @@
|
|||
<script src="benchmarks/bigTextNodes.js"></script>
|
||||
<script src="benchmarks/events.js"></script>
|
||||
<script src="benchmarks/expandoEvents.js"></script>
|
||||
<script src="benchmarks/propertyTreeSplitting.js"></script>
|
||||
|
||||
<script src="harness.js"></script>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче