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