зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1125398 - Benchmark load: arrays of Map (for foreground finalized), r=terrence
--HG-- extra : rebase_source : 8f4ccd90dc0f38bc5bb147997c93213ee8ea7274
This commit is contained in:
Родитель
0240402ceb
Коммит
3a74f71bf9
|
@ -0,0 +1,23 @@
|
|||
window.tests.set('globalArrayFgFinalized', (function() {
|
||||
var garbage = [];
|
||||
var garbageIndex = 0;
|
||||
return {
|
||||
description: "var foo = [ new Map, new Map, ... ]; # (foreground finalized)",
|
||||
|
||||
load: (N) => { garbage = new Array(N); },
|
||||
unload: () => { garbage = []; garbageIndex = 0; },
|
||||
|
||||
defaultGarbageTotal: "8K",
|
||||
defaultGarbagePerFrame: "1M",
|
||||
|
||||
makeGarbage: (N) => {
|
||||
var arr = [];
|
||||
for (var i = 0; i < N; i++) {
|
||||
arr.push(new Map);
|
||||
}
|
||||
garbage[garbageIndex++] = arr;
|
||||
if (garbageIndex == garbage.length)
|
||||
garbageIndex = 0;
|
||||
}
|
||||
};
|
||||
})());
|
|
@ -13,6 +13,7 @@
|
|||
<script src="benchmarks/globalArrayObjectLiteral.js"></script>
|
||||
<script src="benchmarks/globalArrayReallocArray.js"></script>
|
||||
<script src="benchmarks/globalArrayBuffer.js"></script>
|
||||
<script src="benchmarks/globalArrayFgFinalized.js"></script>
|
||||
<script src="benchmarks/selfCyclicWeakMap.js"></script>
|
||||
<script src="benchmarks/pairCyclicWeakMap.js"></script>
|
||||
<script src="benchmarks/textNodes.js"></script>
|
||||
|
|
Загрузка…
Ссылка в новой задаче