commit 0713bf6a06b43f7b164ee2c1cad56b94863923f8 parent e68b7a956299aba559a385b565d51ca3cb68e5ba Author: André Bargull <andre.bargull@gmail.com> Date: Mon, 20 Oct 2025 08:08:32 +0000 Bug 1993733 - Part 1: Speed up slowest jit-tests. r=iain "typedarray/arraybuffer-transfer.js" and "ion/pow-base-power-of-two.js" are the two slowest jit-tests across all platforms. Changes for "typedarray/arraybuffer-transfer.js": - Remove the two largest byte-lengths, so we spend less time checking all typed array contents. Changes for "ion/pow-base-power-of-two.js": - Reduce iteration count from 1000 to 200, which should still ensure there's enough time to tier-up when using `--ion-eager`. - Also perform the same change in the sibling file "ion/pow-constant-power.js". - In `assertNear` avoid calling `diff` when the two numbers are equal. Differential Revision: https://phabricator.services.mozilla.com/D268272 Diffstat:
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/js/src/jit-test/tests/ion/pow-base-power-of-two.js b/js/src/jit-test/tests/ion/pow-base-power-of-two.js @@ -18,7 +18,7 @@ function test(x, y, z) { // values are the same.) var ys = [${y}, ${y}]; var zs = [${z}, ${z}]; - for (var i = 0; i < 1000; ++i) { + for (var i = 0; i < 200; ++i) { assertNear(${fn(x, "ys[i & 1]")}, zs[i & 1]); } `); diff --git a/js/src/jit-test/tests/ion/pow-constant-power.js b/js/src/jit-test/tests/ion/pow-constant-power.js @@ -12,7 +12,7 @@ function test(x, y, z) { // values are the same.) var xs = [${x}, ${x}]; var zs = [${z}, ${z}]; - for (var i = 0; i < 1000; ++i) { + for (var i = 0; i < 200; ++i) { assertEq(${fn("xs[i & 1]", y)}, zs[i & 1]); } `); diff --git a/js/src/jit-test/tests/typedarray/arraybuffer-transfer.js b/js/src/jit-test/tests/typedarray/arraybuffer-transfer.js @@ -7,7 +7,7 @@ const byteLengths = [ 0, 1, 4, 16, 32, 64, 96, // Too large for inline storage - 128, 1024, 4096, 65536, + 128, 1024, ]; // Most values in |byteLengths| are powers-of-two. Add +1/-1 to test for diff --git a/js/src/tests/non262/Math/shell.js b/js/src/tests/non262/Math/shell.js @@ -64,7 +64,7 @@ const ONE_MINUS_EPSILON = 1 - Math.pow(2, -53); // 1.0000000000000002 } else if (!Number.isFinite(a)) { if (b * Math.sign(a) < Number.MAX_VALUE) fail("got " + a + ", expected a number near " + b); - } else { + } else if (a !== b) { // When the two arguments do not have the same sign bit, diff() // returns some huge number. So if b is positive or negative 0, // make target the zero that has the same sign bit as a.