Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Firefox/js/src/jit-test/tests/gc/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 859 B image not shown  

Quelle  pretenured-operations.js   Sprache: JAVA

 
// Check individual operations that support pretenuring their result.

load(libdir + "pretenure.js");

let a;

function run(op) {
  a = [];
  for (let i = 0; i < 1000; i++) {
    a.push(op());
  }
  return a[0];
}

function check(op) {
  assertEq(isNurseryAllocated(run(op)), true);
  minorgc();
  assertEq(isNurseryAllocated(run(op)), false);

  a = undefined;
  gc();
}

setupPretenureTest();

// Object allocation.
check(() => { return {}; });

// Array allocation.
check(() => { return []; });

// Object construction.
check(() => { return new Object(); });
check(() => { return Object(); });

// Array construction.
check(() => { return Array(); });
check(() => { return Array(150); });
check(() => { return new Array(); });
check(() => { return new Array(150); });

// DOM Allocations
let fdo = new FakeDOMObject();
check(() => { return fdo.doBar(); })

Messung V0.5
C=93 H=97 G=94

¤ Dauer der Verarbeitung: 0.5 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.