Commit Graph

25 Commits

Author SHA1 Message Date
Camillo Bruni
a345a442d3 [d8][mjsunit][tools] Improve d8 file API
- Add d8.file.read() and d8.file.execute() helpers
- Change tools and tests to use new d8.file helper
- Unify error throwing in v8::Shell::ReadFile

Change-Id: I5ef4cb27f217508a367106f01e872a4059d5e399
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928505
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74883}
2021-06-01 13:37:57 +00:00
Frank Tang
889769b4df [Intl] Add String toLocale(Lower|Upper)Case perf benchmark
$ python -u tools/run_perf.py --binary-override-path   out/x64.release/d8 --filter "JSTests/Strings/StringToLocaleCase"  test/js-perf-test/JSTests.json
INFO      >>> Running suite: JSTests/Strings/StringToLocaleCase
INFO      >>> Stdout (#1):
StringToLocaleUpperCaseTR-Strings(Score): 622
StringToLocaleLowerCaseTR-Strings(Score): 728
StringToLocaleUpperCase-Strings(Score): 1129
StringToLocaleLowerCase-Strings(Score): 1548

Bug: v8:8839
Change-Id: I35e20c84614e99cb84ae51c175ac6b1cd53ad3a6
Reviewed-on: https://chromium-review.googlesource.com/c/1469327
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59615}
2019-02-15 05:53:04 +00:00
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
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
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
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
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
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
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
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
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
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
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
machenbach
21835209a7 Use merged JSTest config for performance tests.
The new config is now used for perf measurements. The old
ones are deleted to avoid redundancy.

This also ports https://codereview.chromium.org/754523004 to the new config file.

BUG=chromium:374740
LOG=n
TBR=ulan@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/782673003

Cr-Commit-Position: refs/heads/master@{#25674}
2014-12-05 08:43:19 +00:00
dslomov
5aed61cc38 Rename String.prototype.contains to 'includes'.
Per TC39 Nov 2014 decison.

R=arv@chromium.org,yangguo@chromium.org
LOG=Y

Committed: b5379216e2

Review URL: https://codereview.chromium.org/742963002

Cr-Commit-Position: refs/heads/master@{#25448}
2014-11-20 19:21:36 +00:00
machenbach
b3acdf5347 Revert of Rename String.prototype.contains to 'includes'. (patchset #1 id:1 of https://codereview.chromium.org/742963002/)
Reason for revert:
Breaks test262-es6:
http://build.chromium.org/p/client.v8/builders/V8%20Linux/builds/1289

Original issue's description:
> Rename String.prototype.contains to 'includes'.
>
> Per TC39 Nov 2014 decison.
>
> R=arv@chromium.org,yangguo@chromium.org
> LOG=Y
>
> Committed: b5379216e2

TBR=arv@chromium.org,yangguo@chromium.org,dslomov@chromium.org
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/745543002

Cr-Commit-Position: refs/heads/master@{#25432}
2014-11-20 09:03:54 +00:00
dslomov
2dae17fb87 Rename String.prototype.contains to 'includes'.
Per TC39 Nov 2014 decison.

R=arv@chromium.org,yangguo@chromium.org
LOG=Y

Review URL: https://codereview.chromium.org/742963002

Cr-Commit-Position: refs/heads/master@{#25430}
2014-11-20 00:32:13 +00:00
machenbach@chromium.org
5680786c21 Move js perf tests to a common root on the perf dashboard.
BUG=
R=dslomov@chromium.org

Review URL: https://codereview.chromium.org/667373004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-22 13:04:08 +00:00
dslomov@chromium.org
1efcf09375 Perf tests for fromCodePoint and codePointAt.
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/670463005

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-22 11:08:42 +00:00
dslomov@chromium.org
ac8b70cf2b Perf tests for harmony string functions.
R=yangguo@chromium.org

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24765 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 11:05:32 +00:00