Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/js/src/jit-test/tests/warp/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 718 B image not shown  

Quelle  phi-specialization.js

  Sprache: JAVA
 

// |jit-test| --fast-warmup

var sum = 0;

function foo(copy, shouldThrow) {
  switch (copy) {
   case 0:
    var x = 0;
    try {
      if (shouldThrow) { throw 0;}
      x = 1;
    } catch {
      x = "a";
    }
    // We create a specialized phi for x here, which bails out.
    for (var i = 0; i < 100; i++) {
      sum += x;
    }
    break;
   case 1:
    var y = 0;
    try {
      if (shouldThrow) { throw 0;}
      y = 1;
    } catch {
      y = "a";
    }
    // We do not create a specialized phi the second time.
    for (var i = 0; i < 100; i++) {
      sum += y;
    }
    break;
  }
}

with ({}) {}
for (var i = 0; i < 2; i++) {
  for (var j = 0; j < 50; j++) {
    foo(i, false);
  }
  foo(i, true);
}

Messung V0.5 in Prozent
C=95 H=84 G=89

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet am  2026-08-25) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

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.