Commit Graph

290 Commits

Author SHA1 Message Date
Frank Tang
e15586e779 [Intl] Performance benchmark for String.normalize
$ python -u tools/run_perf.py --binary-override-path   out/x64.release/d8 --filter "JSTests/Strings/StringNormalize"  test/js-perf-test/JSTests.json
INFO      >>> Running suite: JSTests/Strings/StringNormalize
INFO      >>> Stdout (#1):
StringNormalize-Strings(Score): 4014
StringNormalizeNFD-Strings(Score): 742
StringNormalizeNFKC-Strings(Score): 3066
StringNormalizeNFKD-Strings(Score): 739

Bug: v8:8844
Change-Id: Ic941bafa82cead9cd0110ad7ac46e528d481189b
Reviewed-on: https://chromium-review.googlesource.com/c/1470964
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59612}
2019-02-14 22:31:23 +00:00
Mythri
58ebbf3475 Fix JSTest/Proxies/Set.*Trap tests to return true from the trap
The spec specifies that a non-true return values from the trap functions
should be treated as error in the strict mode. With the new lazy feedback
effort inferring the language mode is expensive and causes regression on
these tests. Since the test doesn't actually need to test this, fixing
them to return true would help test the performance of calling the trap
without the unnecessary overhead of inferring the language mode.

Bug: chromium:925289
Change-Id: Ib650c3210ee260296257ae3b56174099a5492675
Reviewed-on: https://chromium-review.googlesource.com/c/1462959
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59505}
2019-02-11 16:03:35 +00:00
Z Duong Nguyen-Huu
cc7ac98b0c add micro-benchmark for object freeze with tagged template
Bug: v8:6831
Change-Id: I67e4d9f39576a4067dad59b18b3b4bf04bcdcb99
Reviewed-on: https://chromium-review.googlesource.com/c/1461166
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59486}
2019-02-09 18:13:48 +00:00
Frank Tang
151a0afb34 [Intl] Add perf test for Intl constructors
Just add tests so we can observe the number first.

Got the following results
$ python -u tools/run_perf.py --binary-override-path   out/x64.release/d8 --filter "JSTests/Intl"   test/js-perf-test/JSTests.json
INFO      >>> Running suite: JSTests/Intl
INFO      >>> Stdout (#1):
NewIntlCollator-Intl(Score): 161
NewIntlDateTimeFormat-Intl(Score): 9.73
NewIntlNumberFormat-Intl(Score): 18.6
NewIntlPluralRules-Intl(Score): 18.5
NewIntlListFormat-Intl(Score): 19.4
NewIntlRelativeTimeFormat-Intl(Score): 18.7

Bug: chromium:928098
Change-Id: I59f28393af8f868de639dcb81a7b2f69ce2f0eba
Reviewed-on: https://chromium-review.googlesource.com/c/1455717
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59424}
2019-02-07 01:08:12 +00:00
Ujjwal Sharma
2f543fad22 [test] add performance tests for String#startsWith
Add benchmarks for String.prototype.startsWith in order to keep track
of performance ahead of the torque port.

Bug: v8:8400
Change-Id: I0276b84b315024bba1a0d6f761ee2c6cf2c516a2
Reviewed-on: https://chromium-review.googlesource.com/c/1416070
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58870}
2019-01-17 08:23:06 +00:00
Jakob Gruber
8ea94bb3eb Revert "[test] add perf tests for String.p.startsWith"
This reverts commit 5dee355fe6.

Reason for revert: https://ci.chromium.org/p/v8-internal/builders/luci.v8-internal.ci/v8_linux64_perf_1/4282

Original change's description:
> [test] add perf tests for String.p.startsWith
> 
> Add performance tests for String.prototype.startsWith ahead of port to
> torque in order to keep track of how performance is affected.
> 
> Bug: v8:8400
> Change-Id: Ifc753a6f13da20c1760e545a99fd693717e3acc6
> Reviewed-on: https://chromium-review.googlesource.com/c/1402934
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58685}

TBR=jgruber@chromium.org,usharma1998@gmail.com

Change-Id: I5855b08fa5e55ab8594185a0a84a26f567e2b9d3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8400
Reviewed-on: https://chromium-review.googlesource.com/c/1404446
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58697}
2019-01-10 12:34:51 +00:00
Ujjwal Sharma
5dee355fe6 [test] add perf tests for String.p.startsWith
Add performance tests for String.prototype.startsWith ahead of port to
torque in order to keep track of how performance is affected.

Bug: v8:8400
Change-Id: Ifc753a6f13da20c1760e545a99fd693717e3acc6
Reviewed-on: https://chromium-review.googlesource.com/c/1402934
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58685}
2019-01-10 08:20:48 +00:00
Sigurd Schneider
6720666064 [test] Ensure random generator in JSTests does not use float arithmetic
Change-Id: I3530c3f50fdb805d68099108dc33d93abe6bdb39
Bug: v8:8344
Reviewed-on: https://chromium-review.googlesource.com/c/1379931
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58267}
2018-12-17 10:05:08 +00:00
Jakob Kummerow
2cce5c52c2 Make RegExpFlagsFromString faster
The new ObjectPtr design makes non-inlined helper functions a little
more expensive because "this" is always a pointer where pass-by-value
would be more efficient, which is an issue for functions whose size puts
them right at the threshold of getting inlined or not. String::Get falls
into this category when called from RegExpFlagsFromString. In this case,
we can do even better than restoring inlineability by fine-tuning
the control flow a bit.

This should repair the regression in crbug.com/910573

Bug: chromium:910573
Change-Id: Ie6b68ef01cd978ec502d8d6c1da788c77422dce7
Reviewed-on: https://chromium-review.googlesource.com/c/1369087
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58234}
2018-12-14 01:25:02 +00:00
peterwmwong
f8f742700f [js-perf-test] Add TypedArray#join micro-benchmarks
This patch adds micro-benchmarks for TypedArray#join with and without a separator.
The benchmark can be used to measure any TypedArray#join optimizations we implement in the future.

Test:

  tools/run_perf.py --binary-override-path=out/x64.release/d8 \
    --filter JSTests/TypedArrays/Join \
    test/js-perf-test/JSTests.json

Bug: v8:7624
Change-Id: I526af50da0eff400d21b807ba30a9de2c3d87476
Reviewed-on: https://chromium-review.googlesource.com/c/1369333
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#58163}
2018-12-11 16:06:48 +00:00
tzik
07011cc4f0 Replace %RunMicrotasks with %PerformMicrotaskCheckpoint
This replaces Runtime_RunMicrotasks with Runtime_PerformMicrotaskCheckpoint.

RunMicrotasks forcibly runs Microtasks even when the microtasks are suppressed,
and may causes nested Microtasks in a problematic way. E.g. that confuses
v8::MicrotasksScope::IsRunningMicrotasks() and GetEnteredOrMicrotaskContext().

OTOH, PerformMicrotaskCheckpoint() doesn't run cause the failure as it
respects the microtask suppressions.

As all existing tests don't call RunMicrotasks() in the suppressed situation
(like Promise.resolve().then(()=>{%RunMicrotasks();})), this change should
not affect to these tests.

Change-Id: Ib043a0cc8e482e022d375084d65ea98a6f54ef3d
Reviewed-on: https://chromium-review.googlesource.com/c/1360095
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58068}
2018-12-06 11:10:18 +00:00
Frank Tang
e23e1311b4 [Intl] Add benchmark for toLocaleString/localeCompare
This is a bit of a performance bottleneck currently and
we're planning on improving performance by adding caching.
These benchmarks will allow us to measure the improvements
Add benchmark tests for
 String.prototype.localeCompare()
 Date.prototype.toLocaleString()
 Date.prototype.toLocaleDateString()
 Date.prototype.toLocaleTimeString()
 Number.prototype.toLocaleString()

Run with
python -u tools/run_perf.py --binary-override-path \
  out/x64.release/d8 --filter "JSTests/Strings/StringLocaleCompare" \
  test/js-perf-test/JSTests.json
python -u tools/run_perf.py --binary-override-path \
  out/x64.release/d8 --filter "JSTests/Dates" \
  test/js-perf-test/JSTests.json
python -u tools/run_perf.py --binary-override-path \
  out/x64.release/d8 --filter "JSTests/Numbers" \
  test/js-perf-test/JSTests.json

Before the landing of dffaff7769

 git reset --hard 474a6d6364
got
StringLocaleCompare-Strings(Score): 13240000
toLocaleDateString-Dates(Score): 1877000
toLocaleString-Dates(Score): 1197000
toLocaleTimeString-Dates(Score): 2147000
toLocaleDateString-Dates(Score): 1908000

After the landing of dffaff7769
 git reset --hard dffaff7769
got
StringLocaleCompare-Strings(Score): 97182
toLocaleDateString-Dates(Score): 10436
toLocaleString-Dates(Score): 10436
toLocaleTimeString-Dates(Score): 10669
toLocaleString-Numbers(Score): 2876


Bug: chromium:901748
Change-Id: Ibfea85fe668f1bfaacb2dfe08368cd920d2bbfc6
Reviewed-on: https://chromium-review.googlesource.com/c/1318099
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57323}
2018-11-07 18:08:16 +00:00
Hai Dang
fe9de0b6f3 Add non-COW inputs to Array.from benchmarks.
This makes clear that some benchmarks where Array.from is used to
clone the array are very fast because the array is COW, and the
added benchmarks for non-COW arrays are not as fast. COW-ness does
not affect benchmarks where Array.from is called with a callback
function.

Change-Id: Ie9dd5507df5dd7501ac955dba4d3682c4a54548e
Reviewed-on: https://chromium-review.googlesource.com/c/1314333
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Hai Dang <dhai@google.com>
Cr-Commit-Position: refs/heads/master@{#57208}
2018-11-02 11:41:06 +00:00
Mathias Bynens
591c92acac [js-perf-test] Add Array#{indexOf,includes} micro-benchmark
This patch adds a micro-benchmark comparing Array#indexOf,
Array#includes, and a roughly equivalent `for` loop.

The benchmark can be used to measure any Array#{indexOf,includes}
optimizations we implement in the future.

Test:

    tools/run_perf.py --binary-override-path=out/x64.release/d8 \
      --filter=JSTests/ArrayIndexOfIncludesPolymorphic \
      --extra-flags=--trace-turbo test/js-perf-test/JSTests.json

Bug: v8:8388
Change-Id: I9150d3e56e9d4cb2ffe6baa50ee8cddf8df0ac74
Reviewed-on: https://chromium-review.googlesource.com/c/1307430
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57156}
2018-10-31 07:55:24 +00:00
Hai Dang
b483cc12d0 Extend Array.from micro-benchmarks.
Bug: v8:7980
Change-Id: Ic4c72b02c196b296105a6ddf9c3af9fb699ef8c5
Reviewed-on: https://chromium-review.googlesource.com/c/1297327
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Hai Dang <dhai@google.com>
Cr-Commit-Position: refs/heads/master@{#56952}
2018-10-24 14:17:51 +00:00
Hai Dang
902d21dd66 Fix StringToList to set right length of the new array.
Previously StringToList use the length of the original string, which is
not the right value: we expect the length of the new array to be the
number of characters (codepoints).

Bug: v8:7980
Change-Id: I2efca5715323c4399cb45c53871ae349207f3458
Reviewed-on: https://chromium-review.googlesource.com/c/1297320
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56944}
2018-10-24 13:30:51 +00:00
Hai Dang
d34cbcd789 [js-perf-tests] Fix micro-benchmark of spreading double arrays.
Array.prototype.map is currently not preserving PACKEDness. Use a
for-loop instead.

Bug: v8:7980
Change-Id: I08aff1cbcd84b9de260a5a1e2c68b9cfb5c3d888
Reviewed-on: https://chromium-review.googlesource.com/c/1280329
Commit-Queue: Hai Dang <dhai@google.com>
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56657}
2018-10-15 17:41:16 +00:00
Hai Dang
05b7308aec [js-perf-tests] Add micro-benchmarks for copying double arrays.
Bug: v8:7980
Change-Id: I6e7f1c064830c0055f8708472b62221ab5ca3288
Reviewed-on: https://chromium-review.googlesource.com/c/1280325
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Hai Dang <dhai@google.com>
Cr-Commit-Position: refs/heads/master@{#56647}
2018-10-15 15:05:21 +00:00
Hai Dang
c659e944f1 [js-perf-test] Fix spread set benchmark (again).
Change-Id: Iec5e6baff16260317f693188b01230ab0c2bb86f
Reviewed-on: https://chromium-review.googlesource.com/c/1278809
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Hai Dang <dhai@google.com>
Cr-Commit-Position: refs/heads/master@{#56603}
2018-10-12 10:50:59 +00:00
Hai Dang
65aaf00a61 [js-perf-test] Fix spread set benchmark.
Bug: v8:7980
Change-Id: I35b24638b5e2995bb6a5cbb5a28d0d186e807ef3
Reviewed-on: https://chromium-review.googlesource.com/c/1278725
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Hai Dang <dhai@google.com>
Cr-Commit-Position: refs/heads/master@{#56591}
2018-10-12 08:43:58 +00:00
Hai Dang
2293f88074 [js-perf-test] Add micro-benchmarks for spreading maps and sets.
Bug: v8:7980
Change-Id: I640119fc9a9af66370c47f4d5b16244a1cc3f716
Reviewed-on: https://chromium-review.googlesource.com/c/1256810
Commit-Queue: Hai Dang <dhai@google.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56504}
2018-10-10 08:32:15 +00:00
Jakob Gruber
74320a1b92 Revert "[builtins] Add FastCallFunction builtin that elides some checks"
This reverts commit 99e13e587e.

Reason for revert: Reverting in favor of a general mechanism for this in Torque.

Original change's description:
> [builtins] Add FastCallFunction builtin that elides some checks
> 
> This CL adds a new "Call" stub that can be used by builtins that will
> call the same JS call-back function often (e.g. compare function in
> Array.p.sort). The checks have to be done upfront once, but can then
> be omitted.
> 
> R=​jgruber@chromium.org
> 
> Bug: v8:7861
> Change-Id: Id6e4ca27c3d488a7b1f708cbcb4cbe6cc382513e
> Reviewed-on: https://chromium-review.googlesource.com/1208574
> Commit-Queue: Simon Zünd <szuend@google.com>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55769}

TBR=cbruni@chromium.org,jgruber@chromium.org,szuend@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: v8:7861
Change-Id: I47260993ef2a16bd5348bb0b46da4d34d33ea10b
Reviewed-on: https://chromium-review.googlesource.com/1226871
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55897}
2018-09-14 11:09:08 +00:00
Simon Zünd
99e13e587e [builtins] Add FastCallFunction builtin that elides some checks
This CL adds a new "Call" stub that can be used by builtins that will
call the same JS call-back function often (e.g. compare function in
Array.p.sort). The checks have to be done upfront once, but can then
be omitted.

R=jgruber@chromium.org

Bug: v8:7861
Change-Id: Id6e4ca27c3d488a7b1f708cbcb4cbe6cc382513e
Reviewed-on: https://chromium-review.googlesource.com/1208574
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55769}
2018-09-11 07:31:32 +00:00
Michael Stanton
6da8e1f993 Revert "[Builtins] Array.prototype.forEach perf regression on dictionaries."
This reverts commit 34625fdb5a.

Reason for revert: Test caused timeout, investigating.

Original change's description:
> [Builtins] Array.prototype.forEach perf regression on dictionaries.
> 
> An unnecessary call to ToString() on the array index caused trips to
> the runtime. The fix also includes performance micro-benchmarks so
> we'll have a harder time regressing this case in future.
> 
> Bug: v8:8112
> Change-Id: Iada5bd2e3c6d2246fb1225e7094f3d9c66ddafbd
> Reviewed-on: https://chromium-review.googlesource.com/1206355
> Commit-Queue: Michael Stanton <mvstanton@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55653}

TBR=mvstanton@chromium.org,tebbi@chromium.org

Change-Id: I21de9b9b33edf03f2173f579c4ba0fc3dfd8ff88
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8112
Reviewed-on: https://chromium-review.googlesource.com/1209288
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55681}
2018-09-06 11:00:15 +00:00
Mike Stanton
34625fdb5a [Builtins] Array.prototype.forEach perf regression on dictionaries.
An unnecessary call to ToString() on the array index caused trips to
the runtime. The fix also includes performance micro-benchmarks so
we'll have a harder time regressing this case in future.

Bug: v8:8112
Change-Id: Iada5bd2e3c6d2246fb1225e7094f3d9c66ddafbd
Reviewed-on: https://chromium-review.googlesource.com/1206355
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55653}
2018-09-05 14:25:17 +00:00
Hai Dang
b45204d607 Add warmup to SpreadCallsGeneral benchmarks.
Since the benchmark is very fast, a warmup is useful to reduce the noise
created by optimization.

Change-Id: I4902c5c1695099be766d0fcc563c2f5d0892d3a9
Reviewed-on: https://chromium-review.googlesource.com/1204112
Commit-Queue: Hai Dang <dhai@google.com>
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55618}
2018-09-04 16:15:54 +00:00
Florian Sattler
50089eff3b [js-perf] Further reducing test-case size.
This is needed to meet the timeout requirements of android builds.

Change-Id: Ia771f94683e2e0c88c54ed0e0a75925abfa85786
Reviewed-on: https://chromium-review.googlesource.com/1196508
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55519}
2018-08-30 11:41:30 +00:00
Hai Dang
0c6c2235be Remove slow ArrayLiteralInitialSpread benchmarks to avoid timeout.
Cloning arrays with Array.prototype.map and for-of push is too slow
for large arrays.

Bug: chromium:878681
Change-Id: I70ba5faad9e19cdc5a39cc64fb1b4bcb3fd0bf48
Reviewed-on: https://chromium-review.googlesource.com/1195363
Commit-Queue: Hai Dang <dhai@google.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55496}
2018-08-29 14:50:59 +00:00
Maya Lekova
6a7872b7b8 [turbofan] Introduce a CheckStringAdd node instead of cons string lowering
The new node is introduced for literal string addition and calling
String.prototype.concat in the typed lowering phase. It later might get optimized
away during redundancy elimination, keeping the performance of already existing
benchmarks with string addition. In case the operation is about to throw
(due to too long string being constructed) we just deoptimize, reusing
the interpreter logic for creating the error.

Modify relevant mjsunit and unit tests for string concatenation.

Bug: v8:7902
Change-Id: Ie97d39534df4480fa8d4fe3ba276d02ed5e750e3
Reviewed-on: https://chromium-review.googlesource.com/1193342
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55482}
2018-08-29 09:34:26 +00:00
Hai Dang
601831a9ab Rename and fix JSON data for ArrayLiteralInitialSpread benchmarks.
This fixes the wrong JSON data that was not updated by CL 1188572.

Change-Id: I8cf1a040fa7faa95b967f8dc995b8222304f5514
Reviewed-on: https://chromium-review.googlesource.com/1193244
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Hai Dang <dhai@google.com>
Cr-Commit-Position: refs/heads/master@{#55447}
2018-08-28 10:45:38 +00:00
Hai Dang
8c171105df Enable warmup and/or longer runs for ArrayLiteralInitialSpread.
With warmup and/or longer runs, the benchmark results are more reliable.
This CL also splits the benchmark into smaller ones for easier management.

Change-Id: Ieba0734bef841d131b3184938109ca179994e173
Reviewed-on: https://chromium-review.googlesource.com/1188572
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Hai Dang <dhai@google.com>
Cr-Commit-Position: refs/heads/master@{#55422}
2018-08-27 08:40:46 +00:00
Florian Sattler
819efd1e2f [parser] Reduced test size to not timeout on atom
This halfs the test size but also halfs the baseline for the score to
make it comparable.

Bug: v8:7926
Change-Id: Id3769def6a555ef1bddf8dd5e54c04b8652e5b54
Reviewed-on: https://chromium-review.googlesource.com/1188465
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55403}
2018-08-24 12:48:06 +00:00
Simon Zünd
27040aac02 [jstest] Fix ElementsKind of the array that gets sorted
This CL fixes the "sort-lengths" benchmark so the ElementsKind of the
array to sort is PACKED_SMI again. This was somehow broken.

R=jgruber@chromium.org

Change-Id: I129e001eae4c88e9f99174b3494193232d933c3f
Reviewed-on: https://chromium-review.googlesource.com/1188122
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#55371}
2018-08-24 07:35:07 +00:00
Simon Zünd
9380e8d473 [jstest] Fix Array.p.sort 'sort-lengths' benchmark
This CL fixes wrong parentheses that caused the sort-length benchmark
to generate "random" arrays that only contained zeroes.

R=ishell@chromium.org

Change-Id: Ie2a564da037425a4ef9c2417597cdc13b497e32b
Reviewed-on: https://chromium-review.googlesource.com/1186332
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#55336}
2018-08-23 09:36:13 +00:00
Maya Lekova
28cde91495 [turbofan] Add JSTests for TurboFan
This commit adds a single NumberToString test suite.
It recognizes the following revert by showing more than 100x improvement:
https://chromium-review.googlesource.com/c/v8/v8/+/1166783

Bug: chromium:865494
Change-Id: I93dab3f0b21e98565c76e65722e90a92adc41d72
Reviewed-on: https://chromium-review.googlesource.com/1181042
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55219}
2018-08-20 14:12:13 +00:00
Florian Sattler
1b5797d556 [parser] Adding more parsing js-perf tests
Bug: v8:7926
Change-Id: I32bfb4399d588b48ba3d00ff02ac0133dbd33e8b
Reviewed-on: https://chromium-review.googlesource.com/1179673
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55203}
2018-08-20 08:56:14 +00:00
Camillo Bruni
774f65e48b [js-perf-test] Add assert and assertEquals
Drive-by-fix:
- Remove obsolete mark_shared_functions_for_tier_up flag

Bug: chromium:873728
Change-Id: I6c18b2e55068be913a3fc16932a9be0f9f02b635
Reviewed-on: https://chromium-review.googlesource.com/1173232
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55101}
2018-08-13 23:03:05 +00:00
Camillo Bruni
1fc3dc2fcf [js-perf-test] Fixing JavaScript errors in Array/run.js
Bug: chromium:840785
Change-Id: I043df7aa5203dec27b84636c64286d68a56fba31
Reviewed-on: https://chromium-review.googlesource.com/1172428
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55088}
2018-08-13 14:15:30 +00:00
Camillo Bruni
d845d28ecf [js-perf-tests] Cleanup and more elements kind helpers
Bug: chromium:840785
Change-Id: I93f417084cc3ad3d1b906bdbef5dda14ead208c6
Reviewed-on: https://chromium-review.googlesource.com/1169044
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55082}
2018-08-13 10:14:38 +00:00
Simon Zünd
f2467e3c0b Add copy-within.js benchmark to resources in JSTests.json
This CL fixes the copy-within JSTest benchmark so it works on Android.

R=machenbach@chromium.org

Change-Id: I63662f9ab00d0199614681a53118bc4079e697ff
Reviewed-on: https://chromium-review.googlesource.com/1168488
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#55001}
2018-08-09 08:27:13 +00:00
Simon Zünd
ce206503bc [array] Add basic js-perf benchmarks for Array.p.copyWithin
This CL adds basic JS benchmarks for Array.p.copyWithin to get some
feedback for the upcoming Torque implementation.

R=jgruber@chromium.org

Bug: v8:7624
Change-Id: Ic193a2b576d5fb7ac9f39db0379cece9144f979f
Reviewed-on: https://chromium-review.googlesource.com/1167289
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#54984}
2018-08-08 15:05:16 +00:00
Hai Dang
66ffd1babb Add benchmarks for comparing spread literal with copying schemes for arrays
Bug: v8:7973
Change-Id: I76308296dd45ef797d1eafd6e2736ccefb54302d
Reviewed-on: https://chromium-review.googlesource.com/1162222
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Hai Dang <dhai@google.com>
Cr-Commit-Position: refs/heads/master@{#54924}
2018-08-06 13:32:57 +00:00
Sigurd Schneider
a2d61597ca Reland "[turbofan] Inline Number constructor in certain cases"
This is a reland of 9eca23e9ed

Adds a deopt continuation, which fixes JavaScript stack traces
to contain the number constructor after inlining.

Original change's description:
> [turbofan] Inline Number constructor in certain cases
>
> This CL adds inlining for the Number constructor if new.target is not
> present. The lowering is BigInt compatible, i.e. it converts BigInts to
> numbers.
>
> Bug: v8:7904
> Change-Id: If03b9f872d82e50b6ded7709069181c33dc44e82
> Reviewed-on: https://chromium-review.googlesource.com/1118557
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54454}

Bug: v8:7904
Change-Id: Ic416e5ba81fa3a0f59ae4afa80df83c46a759487
Reviewed-on: https://chromium-review.googlesource.com/1146581
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54609}
2018-07-23 13:17:19 +00:00
Sigurd Schneider
c7a9af61e6 Revert "[turbofan] Inline Number constructor in certain cases"
This reverts commit 9eca23e9ed.

Reason for revert: Clusterfuzz correctness issue

Original change's description:
> [turbofan] Inline Number constructor in certain cases
> 
> This CL adds inlining for the Number constructor if new.target is not
> present. The lowering is BigInt compatible, i.e. it converts BigInts to
> numbers.
> 
> Bug: v8:7904
> Change-Id: If03b9f872d82e50b6ded7709069181c33dc44e82
> Reviewed-on: https://chromium-review.googlesource.com/1118557
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54454}

TBR=jarin@chromium.org,neis@chromium.org,sigurds@chromium.org,bmeurer@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: v8:7904
Change-Id: Ie5fa6c1262b8acc33edb672a0124f4458fcded86
Reviewed-on: https://chromium-review.googlesource.com/1142777
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54544}
2018-07-19 09:13:26 +00:00
Sigurd Schneider
9eca23e9ed [turbofan] Inline Number constructor in certain cases
This CL adds inlining for the Number constructor if new.target is not
present. The lowering is BigInt compatible, i.e. it converts BigInts to
numbers.

Bug: v8:7904
Change-Id: If03b9f872d82e50b6ded7709069181c33dc44e82
Reviewed-on: https://chromium-review.googlesource.com/1118557
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54454}
2018-07-16 10:02:42 +00:00
Théotime Grohens
f659efb15c [dataview] Fix JSTests.json
This CL correctly updates the JSTests.json file in test/mjsunit/
to reflect the new DataView Float32/64 performance tests from
commit e14699c520.

Change-Id: I9cbb05ac0cbd37f8d8a0bc66ebb59c1e05298776
Reviewed-on: https://chromium-review.googlesource.com/1128880
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Théotime Grohens <theotime@google.com>
Cr-Commit-Position: refs/heads/master@{#54323}
2018-07-09 12:42:17 +00:00
Théotime Grohens
e14699c520 [dataview] Improve JS performance test coverage for DataView
This CL adds a comparison for the performance of getting and setting
float32 and float64 values with DataViews and with TypedArrays.

Since TypedArrays do not specify endianness, we can't compare
performance across both possible endiannesses, but this is better
than no comparison at all.

Change-Id: Iea54b942c0bb8168e9d8002d94e2bb9bc6566331
Reviewed-on: https://chromium-review.googlesource.com/1120250
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Théotime Grohens <theotime@google.com>
Cr-Commit-Position: refs/heads/master@{#54158}
2018-07-03 09:06:24 +00:00
Simon Zünd
c6d5179bad [jstest] Add benchmarks that sort arrays of different lengths
All other sorting benchmarks use arrays of roughly the same length.
This CL adds a set of benchmarks that sort arrays of various lengths.

Two data configurations are used for each length: Completely random
and already sorted.

R=jgruber@chromium.org

Bug: v8:7382
Change-Id: Ib80a3421a68029c8e4f823605bab7b2d7fe1ae34
Reviewed-on: https://chromium-review.googlesource.com/1109509
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53917}
2018-06-21 11:35:58 +00:00
Simon Zünd
c6f800fdd3 [jstest] Add random data configuration to ArraySortPreSorted
This CL adds sorting of a randomized array to the PreSorted benchmark
to act as a baseline/reference point.

R=jgruber@chromium.org

Bug: v8:7382
Change-Id: I45b77a6584d5d9a4f14a807f3796af7197673eaa
Reviewed-on: https://chromium-review.googlesource.com/1109508
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#53913}
2018-06-21 10:46:58 +00:00
Simon Zünd
af9e4ba2ca [jstests] Change sorting benchmarks to run setup for each iteration
This CL changes all ArraySort benchmarks to execute the setup
function for each iteration (one run call), instead of only once for
all iterations.

Even though we now also measure the time needed to copy and prepare
the array, this is needed, otherwise we would mainly measure sorting
already sorted arrays.

R=cbruni@chromium.org, jgruber@chromium.org

Change-Id: I2e0e301b52b0288b8c825c3c8401c348c4a0dee7
Reviewed-on: https://chromium-review.googlesource.com/1105045
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#53825}
2018-06-19 09:40:39 +00:00
Sigurd Schneider
6fd25bc6b4 [js-perf-test] Remove flaky perf test from mjsunittest...
...and add a js-perf-test instead.

Bug: v8:7726
Change-Id: I0cd17642c76887a5a24f54792625d62b9cee3667
Reviewed-on: https://chromium-review.googlesource.com/1094637
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53627}
2018-06-11 09:52:58 +00:00
Camillo Bruni
62b714e237 [tests] Fix JSTests
Bug: chromium:848622
Change-Id: I8fff648fc4867cfbad1ee762652a5e628c66aeaa
Reviewed-on: https://chromium-review.googlesource.com/1086929
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53520}
2018-06-05 11:38:43 +00:00
Camillo Bruni
f3131cef16 [js-perf-test] Fix benchmark suite
Add missing parameters to createSuiteWithWarmup

Change-Id: I8865f162443b43b8b7bee4680e17c34d397f8d53
Reviewed-on: https://chromium-review.googlesource.com/1078747
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53438}
2018-05-30 11:47:25 +00:00
Simon Zünd
0dbac434af [js-perf-test] Make regress-2185-2 test into a benchmark.
The regression test 2185-2 measured the Array.p.sort time for various
pre-sorted data configurations. This CL adds the various data
configurations to the ArraySortPreSorted benchmark and removes the
regression test altogether.

R=cbruni@chromium.org, jgruber@chromium.org

Change-Id: I6e2eb235e4a7578f4a107229bfc6a9e89a3aa5e3
Reviewed-on: https://chromium-review.googlesource.com/1076188
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53420}
2018-05-29 15:56:58 +00:00
Camillo Bruni
f728d6984d [js-perf-test] Consistently use createSuite in all benchmarks
Change-Id: I7bf0144bacd0572a42b98d0a0f19df3daf63128b
Bug: chromium:840785
Reviewed-on: https://chromium-review.googlesource.com/1051240
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53418}
2018-05-29 15:06:48 +00:00
Sigurd Schneider
c74f112666 [js-perf-test] Fix tests on android
Bug: v8:7779
Change-Id: I79471ecb038b710d21e938efd3f9207da30e6622

NOTRY=true

Change-Id: I79471ecb038b710d21e938efd3f9207da30e6622
Reviewed-on: https://chromium-review.googlesource.com/1071508
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53319}
2018-05-24 09:09:59 +00:00
Simon Zünd
ccee44e161 [array] Add megamorphic Array.p.sort benchmark
This CL adds a benchmark where the array to sort undergoes
multiple element kind transitions before it is sorted.

R=jgruber@chromium.org

Bug: v8:7382
Change-Id: I5196a33139a5f3b833719c2a111dc9a521bdb37c
Reviewed-on: https://chromium-review.googlesource.com/1066012
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53283}
2018-05-22 14:26:36 +00:00
Sigurd Schneider
74c341bea9 [js-perf-test] Add micro-benchmark with constant regexps
Bug: v8:7779
Change-Id: Iabe5b74900885d489309fdfe25674a29e8690965
Reviewed-on: https://chromium-review.googlesource.com/1068745
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53281}
2018-05-22 13:47:21 +00:00
Sergiy Byelozyorov
9fc3551a7b Reland "[tools] Add benchmark owners to the config"
This is a reland of 989285b7a0

Original change's description:
> [tools] Add benchmark owners to the config
>
> R=machenbach@chromium.org
>
> No-Try: true
> Bug: chromium:826280
> Change-Id: Ic34d13170dfecdd9e791974a34c33ba0248c7a38
> Reviewed-on: https://chromium-review.googlesource.com/1053809
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53138}

TBR=machenbach@chromium.org

No-Try: true
Bug: chromium:826280
Change-Id: I169788ff40dd88a7017b46a15b292568b907f38e
Reviewed-on: https://chromium-review.googlesource.com/1061697
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53215}
2018-05-16 13:53:49 +00:00
Théotime Grohens
c79feb8aa3 Add a first performance test for DataView
and comparison with a JS implementation using TypedArray

Change-Id: Ifec9c19f23e182db25ad3e54edc3f60c6e6048f4
Reviewed-on: https://chromium-review.googlesource.com/1057729
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Théotime Grohens <theotime@google.com>
Cr-Commit-Position: refs/heads/master@{#53177}
2018-05-15 08:45:54 +00:00
Sergiy Byelozyorov
0a71347353 Revert "[tools] Add benchmark owners to the config"
This reverts commit 989285b7a0.

Reason for revert: broke internal bots

Original change's description:
> [tools] Add benchmark owners to the config
> 
> R=​machenbach@chromium.org
> 
> No-Try: true
> Bug: chromium:826280
> Change-Id: Ic34d13170dfecdd9e791974a34c33ba0248c7a38
> Reviewed-on: https://chromium-review.googlesource.com/1053809
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53138}

TBR=machenbach@chromium.org,sergiyb@chromium.org

Change-Id: Iec3f8fa8eda77b1bcfb00274b28a12e4d233d6c4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:826280
Reviewed-on: https://chromium-review.googlesource.com/1057091
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53140}
2018-05-14 09:52:33 +00:00
Sergiy Byelozyorov
989285b7a0 [tools] Add benchmark owners to the config
R=machenbach@chromium.org

No-Try: true
Bug: chromium:826280
Change-Id: Ic34d13170dfecdd9e791974a34c33ba0248c7a38
Reviewed-on: https://chromium-review.googlesource.com/1053809
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53138}
2018-05-14 09:27:32 +00:00
Choongwoo Han
c34562803e [string] Add a perf test for String.p.split
Bug: v8:7103
Change-Id: I86e208de38aad1d41c65d39b94996012efa1346b
Reviewed-on: https://chromium-review.googlesource.com/1045949
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53063}
2018-05-08 12:19:52 +00:00
Simon Zünd
29b65c39c0 Gracefully fail BigInt TypedArray.p.sort benchmarks.
'ref' builds might not yet have BigInt support. Instead of crashing
when the benchmark file is loaded, the benchmark now fails during
setup.

R=jgruber@chromium.org

Bug: chromium:834654
Change-Id: I2c03aeba4b6af947061504c369b5228d7b344307
Reviewed-on: https://chromium-review.googlesource.com/1019100
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52685}
2018-04-19 12:21:10 +00:00
Simon Zünd
1b71e729bc Add TypedArray.p.sort benchmarks for BigInts.
This CL adds sort benchmarks for BigUint64Array and BigInt64Array.
They form their own benchmark group separate from the Int and
Float types/element kinds.

R=jgruber@chromium.org

Bug: v8:7382
Change-Id: Id3ce125be36a42c419a2632edc5f930547a1720e
Reviewed-on: https://chromium-review.googlesource.com/1016643
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#52668}
2018-04-18 12:43:55 +00:00
Mathias Bynens
2c7c8da127 [js-perf-test] Add String#{starts,ends}With micro-benchmark
This patch adds a micro-benchmark comparing
`string.startsWith(singleCodeUnit)`, `string[0]`,
`string.endsWith(singleCodeUnit)`, and `string[string.length - 1]`.

The benchmark can be used to measure any String#{starts,ends}With
optimizations we implement in the future.

Test:

    tools/run_perf.py --binary-override-path=out/x64.release/d8 \
      --filter=JSTests/Strings/StringStartsEndsWithComparison \
      --extra-flags=--trace-turbo test/js-perf-test/JSTests.json

Bug: v8:7453
Change-Id: I68cad197fbcbfc6b1938fc437776c319ee9f81df
Reviewed-on: https://chromium-review.googlesource.com/1011619
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52589}
2018-04-13 09:36:29 +00:00
Simon Zünd
b8defbc99d Add missing file to resources for TypedArray.p.sort benchmarks.
R=sergiyb@chromium.org

Bug: v8:7382
Change-Id: I6fc0b2ca9857a80192e1a202ee516f544105ee56
Reviewed-on: https://chromium-review.googlesource.com/1011611
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#52588}
2018-04-13 08:58:39 +00:00
Simon Zünd
5874911bc7 Extend Array.p.sort benchmarks.
This adds benchmarks that sort all element kinds with multiple comparison
functions. This also adds benchmarks that cause the element kind of
the array to change after x amount of comparisons.
The last set of benchmarks that are added, measure performance on
pre-sorted arrays.

R=jgruber@chromium.org, petermarshall@chromium.org

Bug: v8:7382
Change-Id: I620de37f4a28f8096682bb708ea4f7a9a21d5316
Reviewed-on: https://chromium-review.googlesource.com/1009602
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52574}
2018-04-12 14:11:34 +00:00
Simon Zünd
3953955aab Extend the existing TypedArray.sort benchmark.
Benchmark now sorts every element type of TypedArray and groups the
benchmarks by integer and floating point types. Also adding a sort
benchmark that uses multiple custom compare functions.

R=petermarshall@chromium.org

Bug: v8:7624
Change-Id: Id0f44adf78398c99a17fe3edb6ee5d7fccc4d99b
Reviewed-on: https://chromium-review.googlesource.com/1000774
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52541}
2018-04-11 09:02:39 +00:00
Simon Zünd
9018bb1af4 Add basic Array.p.sort benchmarks for the different element kinds.
The sort benchmarks are currently in their own directory, because we
might want to run them in isolation during the upcoming sort rework.

R=jgruber@chromium.org, petermarshall@chromium.org

Bug: v8:7382
Change-Id: Ic2e4e34d2838690529511d591099a66d0b908b0a
Reviewed-on: https://chromium-review.googlesource.com/1004997
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#52537}
2018-04-11 08:38:45 +00:00
peterwmwong
b4cf629812 [js-perf-test] Add benchmark for String.prototype.matchAll
Bug: v8:6890
Change-Id: I0778aee65985852950c48b519baeb7fe6d81f8eb
Reviewed-on: https://chromium-review.googlesource.com/998394
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52520}
2018-04-10 12:47:33 +00:00
Sathya Gunasekaran
314517106a Reland "Reland "[test] Add JSTest benchmark for object literal spread""
This reverts commit 99c0410b10.

TBR=bmeurer@chromium.org

Bug: v8:7611
Change-Id: I3f75631e1d15173d2679a3bd37ef05e56e4a28e2
Reviewed-on: https://chromium-review.googlesource.com/995581
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52362}
2018-04-04 16:41:10 +00:00
Sergiy Byelozyorov
99c0410b10 Revert "Reland "[test] Add JSTest benchmark for object literal spread""
This reverts commit 2ade52e93b.

Reason for revert: still breaks internal bots, e.g. https://uberchromegw.corp.google.com/i/internal.client.v8/builders/v8_nexus7_perf

Original change's description:
> Reland "[test] Add JSTest benchmark for object literal spread"
> 
> This reverts commit cd1dd34f20.
> 
> Patchset 1 is the original CL that was reverted. Patchset 2 has the
> fix.
> 
> TBR=bmeurer@chromium.org
> 
> Bug: v8:7611
> Change-Id: I15291175ab894ef667c001e1b21b8b220e1f9b48
> Reviewed-on: https://chromium-review.googlesource.com/993995
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52337}

TBR=gsathya@chromium.org,bmeurer@chromium.org

Change-Id: Ie7da3a02df16df716293d0104f1f7d16208f1baf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7611
Reviewed-on: https://chromium-review.googlesource.com/995294
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52347}
2018-04-04 10:57:58 +00:00
Sathya Gunasekaran
2ade52e93b Reland "[test] Add JSTest benchmark for object literal spread"
This reverts commit cd1dd34f20.

Patchset 1 is the original CL that was reverted. Patchset 2 has the
fix.

TBR=bmeurer@chromium.org

Bug: v8:7611
Change-Id: I15291175ab894ef667c001e1b21b8b220e1f9b48
Reviewed-on: https://chromium-review.googlesource.com/993995
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52337}
2018-04-03 22:03:00 +00:00
Sergiy Byelozyorov
cd1dd34f20 Revert "[test] Add JSTest benchmark for object literal spread"
This reverts commit 0258a06180.

Reason for revert: breaks perfbots, e.g. https://luci-milo.appspot.com/buildbot/internal.client.v8/v8_arm64_perf/21485

Original change's description:
> [test] Add JSTest benchmark for object literal spread
> 
> Bug: v8:7611
> Change-Id: Ia5467fd4da3b385568bcc3f3fdc1a8c56bd6340e
> Reviewed-on: https://chromium-review.googlesource.com/987321
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52313}

TBR=gsathya@chromium.org,bmeurer@chromium.org

Change-Id: I4a0e8da965b784739f821ff2c3bba742e70a4b7f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7611
Reviewed-on: https://chromium-review.googlesource.com/992092
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52319}
2018-04-03 10:11:43 +00:00
Sathya Gunasekaran
0258a06180 [test] Add JSTest benchmark for object literal spread
Bug: v8:7611
Change-Id: Ia5467fd4da3b385568bcc3f3fdc1a8c56bd6340e
Reviewed-on: https://chromium-review.googlesource.com/987321
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52313}
2018-04-02 20:20:22 +00:00
Benedikt Meurer
6b72fe3b64 [js-perf-test] Don't run SixSpeed benchmarks with --future.
Change-Id: I187cf2f5cffa48ea4eb3d137260fd6dc555b1ed5
Reviewed-on: https://chromium-review.googlesource.com/974404
Reviewed-by: Michael Hablich <hablich@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52129}
2018-03-22 09:50:12 +00:00
Sigurd Schneider
5bc8daf6b4 [js-perf-test] Add micro-benchmark for StringAt functions
This benchmark checks comparison with StringAt functions against
each other and and constants. The benchmarks will serve to measure
the effect of an optimization that will omit the implicit
String.fromCharCode in such cases.

Bug: v8:7531
Change-Id: I171df92301516c96beb6a4ed86f1dec8d10e34f5
Reviewed-on: https://chromium-review.googlesource.com/957086
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51839}
2018-03-09 12:43:36 +00:00
Sigurd Schneider
80447cff70 [js-perf-test] Add regression benchmark
This CL adds a regression benchmark for a fast-path of
String.p.charCodeAt, which is important for node.js.

Bug: v8:7326
Change-Id: I54efaa2988c595dd40e6a55a3464b3ee7de6f07b
Reviewed-on: https://chromium-review.googlesource.com/942885
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51654}
2018-03-01 13:52:44 +00:00
Georg Neis
5f8ba95a93 [js-perf-test] Add a slightly more general benchmark for spread calls.
Bug: v8:7446
Change-Id: Ic4eaeeb1e4852cffde679b359e562a48e5ba39e9
Reviewed-on: https://chromium-review.googlesource.com/942922
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51648}
2018-03-01 12:42:06 +00:00
Sigurd Schneider
4dd446ab47 [js-perf-tests] Add substring perf tests
This CL also reorganizes the Strings test suite

Bug: v8:7340
Change-Id: I54d4d76a16c362e38ebfc9719ac8cb1a490ef3cc
Reviewed-on: https://chromium-review.googlesource.com/941122
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51631}
2018-02-28 13:03:57 +00:00
Adam Klein
8fa85efd27 [esnext] Remove always-disabled support for function.sent
This proposal has not moved beyoned stage 2 in two years, and has never
moved past the HARMONY_INPROGRESS state in flag-definitions.h.

It was originally added to aide in desugaring yield*, but is no longer
used for that purpose.

Bug: v8:4700, v8:7310
Change-Id: Ieca40d8e4bf565516bbe71e47b996daa70d2e835
Reviewed-on: https://chromium-review.googlesource.com/935297
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51582}
2018-02-26 20:01:41 +00:00
Sergiy Byelozyorov
0795537250 Add Peter as an owner of the JSTests benchmark
This information is useful to know whom to assign bugs to when these tests are
crashing on our infrastructure.

R=petermarshall@chromium.org

No-Try: true
Change-Id: Ia165e0236602cae73e144011537d642e3535fa6b
Reviewed-on: https://chromium-review.googlesource.com/908563
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51259}
2018-02-13 02:49:25 +00:00
Sergiy Byelozyorov
29844bac3a Add for-each.js to the required resources of the test
R=mvstanton@chromium.org

Bug: chromium:810410
Change-Id: I366c0cb3a8726a0d4e1072aa0332b2a9235b120b
Reviewed-on: https://chromium-review.googlesource.com/912870
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51228}
2018-02-12 08:54:53 +00:00
Dan Elphick
95f36d4a6c Remove redundant Array from ArrayFrom tests in JStests.json
Bug: chromium:810320
Change-Id: I5e07d27e4895539b49707c56197fc8413281af06
Reviewed-on: https://chromium-review.googlesource.com/907891
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51172}
2018-02-08 11:43:46 +00:00
Dan Elphick
544c970534 [js-perf-tests] Create tests for Array.from
Modify "run_perf.py --filter Array/" so that it will let match "Array" but
not "ArrayLiteralSpread". Previously --filter Array/ would match nothing.

Change-Id: I1f9c677e3558fc2256a71306af5fc1a8394ac698
Reviewed-on: https://chromium-review.googlesource.com/895453
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51098}
2018-02-05 16:23:19 +00:00
Sigurd Schneider
51c6315638 [js-perf-tests] Hook up new benchmarks for String.p.charCodeAt
Bug: v8:7092, v8:7326, chromium:806758
Change-Id: Id8a3bc2455875af9dfdc01619d8217e033099e7e
Reviewed-on: https://chromium-review.googlesource.com/895690
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51006}
2018-01-31 17:34:06 +00:00
Sigurd Schneider
6d36bae42c [js-perf-tests] Improve string benchmarks
Add inbounds benchmark for String.p.charCodeAt
and add in and out of bounds benchmarks for
String.p.codePointAt.

Bug: v8:7092, v8:7326, chromium:806758
Change-Id: I48065627bd79d8fb24e55b2f6dce590e7adbbd6e
Reviewed-on: https://chromium-review.googlesource.com/891858
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50942}
2018-01-30 05:10:53 +00:00
Georg Neis
f893ee89ea [test] Add JSTest benchmark for array literal spread.
R=bmeurer@chromium.org

Bug: v8:5940
Change-Id: I8ce536f6f82225e8b05ef05a45eb3487360b14a2
Reviewed-on: https://chromium-review.googlesource.com/878126
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50778}
2018-01-23 05:39:30 +00:00
Mike Stanton
fb922b1764 [TurboFan] Allow unreliable maps in array builtins
We don't currently inline array builtins if we detect any side effects
between the load of the receiver map and the call to the builtin.
The introduction of a map check allows us to be more permissive.

Bug: v8:7250
Change-Id: I6b3f9243f6506eff45c0d727c47a7e8cb8765640
Reviewed-on: https://chromium-review.googlesource.com/849005
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50620}
2018-01-16 14:01:29 +00:00
Mike Stanton
a0ab7d4527 [JSPerfTests] Refactoring in Array 2nd-order builtin tests
The (numbing) repetition in these tests were leading to errors when
writing new tests. Now a function DefineHigherOrderTests() can be
used to succinctly describe a test on (mostly) a single line.

Change-Id: I70d65ffd784a17bbf0b9ca2de477135c5d901794
Reviewed-on: https://chromium-review.googlesource.com/864144
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50590}
2018-01-15 16:32:27 +00:00
Dan Elphick
10f2a1a649 Create js-perf-test for Array.of
Add tests with a few Array.of invocations in preparation for adding a
CodeStubAssembler generated version.

Change-Id: I5aee3f32a584ae31cebcbbe6b0e5491a4bc1da34
Reviewed-on: https://chromium-review.googlesource.com/861884
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50550}
2018-01-12 16:28:35 +00:00
Sigurd Schneider
f22287b1f3 [turbofan] Add benchmarks for String.prototype.charCodeAt to JSTests.json
Bug: v8:7127, v8:7092
Change-Id: Ib79c1cf5e65632b8701528799fe7df1d5407ad59
Reviewed-on: https://chromium-review.googlesource.com/846766
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50322}
2017-12-29 15:26:51 +00:00
Sigurd Schneider
807fc14485 [Turbofan] Add benchmark for String.prototype.charCodeAt
This also fixes benchmark scores for String.prototype.indexOf

Bug: v8:7127, v8:7092
Change-Id: Iee0f9689feb5923b300e253c267a6f32ffd4da20
Reviewed-on: https://chromium-review.googlesource.com/846739
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50316}
2017-12-29 10:23:56 +00:00
Sigurd Schneider
5e18f84953 [turbofan] Add benchmarks for String.indexOf
Bug: v8:7127, v8:6270
Change-Id: Ic35a9b7a5145115736934b0c7de6ace26e9c0e51
Reviewed-on: https://chromium-review.googlesource.com/832966
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50191}
2017-12-19 10:54:37 +00:00
Choongwoo Han
b15f16a41e [js-perf-test] Add TypedArray slice perf test case
Add a test case to check performance of TypedArray.prototype.slice for
non-species cases.

Bug: v8:5929
Change-Id: Ic4aa43575c442c80a4ff981df38c0262f6b2a7b8
Reviewed-on: https://chromium-review.googlesource.com/831308
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50150}
2017-12-18 09:22:33 +00:00
Choongwoo Han
09103e9ac1 [js-perf-test] Add TypedArray subarray perf test case
Add a test case to check performance of TypedArray.prototype.subarray
for non-species cases.

Bug: v8:7161
Change-Id: Idab8187403cc61596ce90fe03ab2300c38055857
Reviewed-on: https://chromium-review.googlesource.com/831370
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50149}
2017-12-18 09:21:28 +00:00
Sergiy Byelozyorov
12afb22458 [test] Add find-index.js to the list of resources for the test
R=jgruber@chromium.org

Bug: chromium:791045, v8:1956, v8:7165
Change-Id: I58ba09248824f0309a3d37afa3e59bdea7c5f1f1
Reviewed-on: https://chromium-review.googlesource.com/813914
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49933}
2017-12-07 13:49:46 +00:00
peterwmwong
1d17438905 [js-perf-test] Add Array.p.findIndex microbenchmarks
Bug: chromium:791045, v8:1956, v8:7165
Change-Id: I03f26bbbe65217cedf663af59ef5eb63a5dcf039
Reviewed-on: https://chromium-review.googlesource.com/810039
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49899}
2017-12-06 15:57:05 +00:00
peterwmwong
e0e1a5e564 [js-perf-test] Add Array.p.find microbenchmarks
Bug: chromium:791045, v8:1956, v8:7165
Change-Id: I5c5cf74376f61f71591a8c67fbc9d1584a2b9128
Reviewed-on: https://chromium-review.googlesource.com/807748
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49864}
2017-12-05 13:43:51 +00:00