Commit 31116ca3 authored by Adam Klein's avatar Adam Klein Committed by Commit Bot

[mjsunit] Make an Array#join regression test 8x faster

regress-336820 is testing that joining a very sparse
array to create a too-big string results in a RangeError,
rather than a crash. Reducing the largest index by
two orders of magnitude speeds this up (on x64 debug)
by 8x (from 8 seconds down to 1). Given that this test
takes nearly 9 minutes on arm64 sim debug, I hope to
see big ones there too.

Bug: v8:7783, chromium:336820
Change-Id: I74c22cf451a892eb039efc7f1259152921bf8530
Reviewed-on: https://chromium-review.googlesource.com/c/1323915Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57335}
parent af0af95c
......@@ -33,6 +33,6 @@ assertThrows((function() {
x = new Array();
x[0] = s;
x[1000] = s;
x[1000000] = s;
x[10000] = s;
s = x.join("::");
}}), RangeError);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment