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

Quelle  pause-single.js

  Sprache: JAVA
 

// |jit-test| --enable-atomics-pause; skip-if: !Atomics.pause

// Call Atomics.pause with no arguments.
function noArguments() {
  for (let i = 0; i < 1000; ++i) {
    Atomics.pause();
  }
}
for (let i = 0; i < 2; ++i) noArguments();

// Call Atomics.pause with the constant integer zero.
function zero() {
  for (let i = 0; i < 1000; ++i) {
    Atomics.pause(0);
  }
}
for (let i = 0; i < 2; ++i) zero();

// Call Atomics.pause with an linear increasing integer.
function increasingLinear() {
  for (let i = 0; i < 1000; ++i) {
    Atomics.pause(i);
  }
}
for (let i = 0; i < 2; ++i) increasingLinear();

// Call Atomics.pause with an linear decreasing integer.
function decreasingLinear() {
  for (let i = 0; i < 1000; ++i) {
    Atomics.pause(-i);
  }
}
for (let i = 0; i < 2; ++i) decreasingLinear();

// Call Atomics.pause with an exponentially increasing integer.
function increasingExp() {
  for (let i = 0; i < 1000; ++i) {
    Atomics.pause(2 ** Math.min(i >> 110));
  }
}
for (let i = 0; i < 2; ++i) increasingExp();

// Call Atomics.pause with an exponentially decreasing integer.
function decreasingExp() {
  for (let i = 0; i < 1000; ++i) {
    Atomics.pause(-(2 ** Math.min(i >> 110)));
  }
}
for (let i = 0; i < 2; ++i) decreasingExp();

Messung V0.5 in Prozent
C=87 H=58 G=73

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© 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.