1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-08 12:06:26 +00:00
Commit Graph

96 Commits

Author SHA1 Message Date
Devon Carew
3238d433fa Revise the SDK size benchmark.
Change-Id: Iab9b301737e141a9ad95d4f4e9391a06b5788e6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210760
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-08-20 21:47:25 +00:00
Alexander Aprelev
02599e58ae [vm/benchmarks] Ensure EventLoopLatencyRegexp benchmark encapsulated.
Clone latency.dart into the benchmark from EventLoopLatencyJson

Change-Id: I92090b4decf49e67b937d8095bb7c36adf79c509
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210430
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-08-18 14:29:04 +00:00
Tess Strickland
4c47fdbea6 [gardening] Fix SDKArtifactSizes benchmark.
Compress the dart-sdk directory under the root, not the grandparent of
the root which will be the SDK checkout.

Also fix so dart2 version is 2.9 compatible and dart version is
latest version compatible.

Change-Id: I6e8875d9a3c9fdabf301db379340b2d8473a54cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210440
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-08-18 09:28:53 +00:00
Devon Carew
8bb5ced986 add a benchmark tracking the dart sdk size
Change-Id: Ibbd23a3c376584711515462620e1a22254214181
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210289
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-08-17 16:14:42 +00:00
Alexander Aprelev
455a105c42 [vm/benchmark] Introduce benchmarks that measures event loop latency for regexp processing.
This captures performance issues reported on https://github.com/flutter/flutter/issues/88063

Change-Id: Ie216808a02231be7915c60268718f3e0a0dc3c99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210282
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-08-16 18:41:49 +00:00
Alexander Aprelev
7c772a653b [benchmarks] Add IsolateFibonacci benchmark wrapper around existing test.
Change-Id: I66268cd24bcf55dd75baf7000948dcbe81928001
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209180
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-08-09 15:02:28 +00:00
Martin Kustermann
b15f99bdbf [vm] Prevent tree shaking of fields in SendPort benchmark
In AOT the SendPort.{Send,Receive}.BinaryTree.* are really fast, because
the tree shaker will remove the fields, which will make us actually not
construct a tree at all but only one root node without fields.

TEST=Changes benchmark to work as intended

Change-Id: Idbcb1e15613b1fd071591be40c4ffd9eadc86ce5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207121
Auto-Submit: Martin Kustermann <kustermann@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-07-16 04:39:37 +00:00
Ben Konyi
378ab67916 [ Benchmarks ] Output CodeSize of 0 for missing artifacts on certain
platforms

Change-Id: Iceee212c432524055650a2a008d3023aa84efe82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206585
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-07-12 23:23:38 +00:00
Stephen Adams
b0310477d9 Add benchmark for Object.hash
Change-Id: If13333096b337994fd6ad45804812a3a51b90aae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205020
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2021-06-30 21:06:34 +00:00
Martin Kustermann
848449437b [vm/concurrency] Add SendPort.{Send,Receive}.* benchmarks
Other existing benchmarks that are related (e.g. IsolateJson) measure
multiple things at the same time (e.g. utf8 decoding speed, json
decoding speed, isolate communication).

The benchmarks in this CL focus purely on sending object graphs via [SendPort]s
and measure sending and receiving time. As data we measure json
(map/list/string heavy) as well as binary trees (user object heavy).

Issue https://github.com/dart-lang/sdk/issues/36097

TEST=Adding benchmark.

Change-Id: I032b5c63ee386697610ea2873914109789e00137
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203763
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-06-17 10:05:58 +00:00
Ben Konyi
9cf93054ee [ benchmark ] Fix names for SDKArtifactSizes benchmark outputs
Change-Id: I569723b04136d37607a61e5a47a2e8661425f820
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202263
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-06-03 17:26:07 +00:00
Stephen Adams
09b75a3d53 [benchmarks] Add benchmark to measure dart2js string pool cost
Change-Id: I15099af08526444c2e01da46b9939f2435547c90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201981
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-06-03 03:11:44 +00:00
Ben Konyi
71238faee8 [ benchmark ] Use '.' instead of '_' to represent sub-benchmarks in SDKArtifactSizes
Change-Id: Ia47f9565025b79440aa179a215db2d7a95b744e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201582
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-05-27 18:14:14 +00:00
Daco Harkes
b0bfee6627 [benchmarks/vm] Add benchmarks for #45908
The implementation of const map literals is based on linear lookups in
an array containing key/value pairs instead of a hash table.

Bug: https://github.com/dart-lang/sdk/issues/45908

Golem CL:
https://chrome-internal-review.googlesource.com/c/golem/+/3852562

Change-Id: If0a980339ee1342c41f9388e0bd7b3615a4ef4e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200188
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-05-27 07:54:14 +00:00
Ben Konyi
7767e6acc1 [ Benchmarks ] Add benchmarks for SDK snapshot sizes and Dart CLI
startup time

Change-Id: If0c792036ac377aa3d777f95816e9d1d548326b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201167
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-05-25 17:52:41 +00:00
Clement Skau
4d5055805f [VM/FFI] Adds FFI leaf calls.
This CL adds FFI leaf calls by adding `lookupFunction(.., isLeaf)`
and `_asFunctionInternal(.., isLeaf)`, which generate FFI leaf calls.
These calls skip a lot of the usual frame building and generated <->
native transition overhead.

`benchmark/FfiCall/` shows a 1.1x - 4.3x speed-up between the regular
FFI calls and their leaf call counterparts (JIT, x64, release).

TEST=Adds `tests/ffi{,_2}/vmspecific_leaf_call_test.dart`. Tested FFI tests.

Closes: https://github.com/dart-lang/sdk/issues/36707
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-release-arm64-try,vm-ffi-android-release-arm-try,vm-ffi-android-product-arm64-try,vm-ffi-android-product-arm-try,vm-ffi-android-debug-arm64-try,vm-ffi-android-debug-arm-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-release-x64-try,vm-kernel-mac-debug-x64-try,vm-kernel-precomp-nnbd-mac-release-simarm64-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-precomp-asan-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-precomp-ubsan-linux-release-x64-try,vm-kernel-precomp-tsan-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try
Bug: https://github.com/dart-lang/sdk/issues/36707
Change-Id: Id8824f36b0006bf09951207bd004356fe6e9f46e
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179768
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-05-21 11:12:02 +00:00
Stephen Adams
235ff47a07 [benchmarks] Fix lints in Omnibus benchmarks
Change-Id: I08dd527bcfd3b4ed97d0c57a877c64ff0ec49ade
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196460
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-04-23 20:11:52 +00:00
Stephen Adams
e8f5367219 [benchmarks] Move Richards from internal benchmarks to SDK benchmarks
Change-Id: I523b8c29ff97235e2dec0fd50f67ee4e8cd4ef13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195191
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2021-04-15 22:29:07 +00:00
Daco Harkes
f820f7ce48 [vm/ffi] Exercise unaligned reads/writes
This CL validates the hypothesis that the only misaligned reads/writes
which are not supported are double and float, and only on arm32.

Running these on the CI and Golem will validate this hypothesis.

Bug: https://github.com/dart-lang/sdk/issues/45009

Change-Id: I0a77fd1f47a388d1f454c1ded50cd7ecaeadb0f0
Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try,dart-sdk-mac-try,dart-sdk-win-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-mac-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-msan-linux-release-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-precomp-android-release-arm_x64-try,analyzer-analysis-server-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190523
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-03-16 20:17:31 +00:00
Clement Skau
4235154e3d [ffi/benchmark] Refactor FfiCall benchmarks.
Inlines in the test classes:
- Native function lookup.
- The main benchmark loop.

This CL contains the refactoring necessary to update the
benchmarks to include leaf calls, as seen in:
https://dart-review.googlesource.com/c/sdk/+/179768

TEST=tools/build.py -m release dart && out/ReleaseX64/dart benchmarks/FfiCall/dart{,2}/FfiCall.dart

Change-Id: I1e85f991d895862c27ae99a71f5d4785ccdf5676
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188465
Commit-Queue: Clement Skau <cskau@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-03-02 16:06:22 +00:00
Clement Skau
3e7d590a30 [ffi/benchmark] Dedup. test code in FfiCall.
This also serves as a step in the refactoring needed for
the FFI leaf call benchmark changes in:
https://dart-review.googlesource.com/c/sdk/+/179768

Change-Id: I0876d610b1d79b05c4bcd7e3cd9ef48d1beff432
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186294
Auto-Submit: Clement Skau <cskau@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-02-23 14:45:59 +00:00
Daco Harkes
c7422d5277 [benchmarks/ffi] Memory access with asTypedList
Adds benchmarks using `asTypedList` on Pointers to investigate from
where it pays of to do construct a TypedData to do memory access
instead of on the Pointer directly.

x64 JIT results:
- Memory access on TypedData (int8) is ~2,5 faster than on Pointer.
FfiMemory.PointerInt8(RunTime): 72.23885718413639 us.
FfiMemory.PointerInt8TypedDataReuse(RunTime): 28.239710263614928 us.

- Constructing the TypedData for 1000 reads + 1000 writes takes ~20%
  of the total runtime, 400 reads or writes on TypedData, 160 reads
  or writes on Pointer.
FfiMemory.PointerInt8TypedDataNew(RunTime): 34.345480148372026 us.
FfiMemory.PointerInt8TypedDataReuse(RunTime): 28.239710263614928 us.

x64 AOT results:
FfiMemory.PointerInt8(RunTime): 13.862134213116345 us.
FfiMemory.PointerInt8TypedDataNew(RunTime): 26.149628021913365 us.
FfiMemory.PointerInt8TypedDataReuse(RunTime): 24.73322780505299 us.
- Using asTypedList is slower. (Some optimizations fail to kick in.)

Change-Id: I401edb88baf3a3c5094ecae808f122adf258da28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186289
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-02-23 12:41:49 +00:00
Clement Skau
9d03dd9378 [ffi/benchmark] Fix FfiCall branchmarks.
- Fixes expect logic in Float.. and Double.. benchmarks.
- Fixes expected values in the same benchmarks.
- Fixes typos in a few FFI function lookups.
- Adds expected value to 'Unexpected result' message.

Change-Id: I16eff1cac451412b376f56c070c5b8127ff744e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186284
Auto-Submit: Clement Skau <cskau@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-02-23 08:41:39 +00:00
Daco Harkes
a45276ab91 Reland "[vm/ffi] Roll package:ffi to Allocator and Opaque"
This can only be landed when `Allocator`, `Opaque`, and `AllocatorAlloc`
have rolled into Flutter/engine, that into Flutter/flutter, and into g3.

Deletes all the copies of `_CallocAllocator` and uses the one from
`package:ffi` instead.

Bug: https://github.com/dart-lang/sdk/issues/44622
Bug: https://github.com/dart-lang/sdk/issues/43974
Bug: https://github.com/dart-lang/sdk/issues/44621
Bug: https://github.com/dart-lang/sdk/issues/38721

Change-Id: I486034b379b5a63cad4aefd503ccd0f2ce5dd45e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180188
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-02-10 10:19:28 +00:00
Daco Harkes
3cfcc5a8e5 Revert "[vm/ffi] Roll package:ffi to Allocator and Opaque"
Revert submission 177862

Reason for revert: breaks g3 without https://github.com/flutter/engine/pull/23808
Reverted Changes:
I50b3b4c31:[vm/ffi] Roll `package:ffi` to `Allocator` and `Op...
I3f5b08c08:[vm/ffi] Change `Pointer<T extends Struct>.ref` to...
I6141c193b:[vm/ffi] Disallow empty structs

Change-Id: I128e7b096faea650e0ba0850a411eed3e97c00e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180185
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-01-20 21:37:11 +00:00
Daco Harkes
7d648e3ae7 [vm/ffi] Roll package:ffi to Allocator and Opaque
This can only be landed when `Allocator` and `Opaque` have rolled into
Flutter/engine, that into Flutter/flutter, and that into g3.
flutter/flutter/commit/a706cd211240f27be3b61f06d70f958c7a4156fe

Deletes all the copies of `_CallocAllocator` and uses the one from
`package:ffi` instead.

Issue: https://github.com/dart-lang/sdk/issues/44622
Issue: https://github.com/dart-lang/sdk/issues/43974
Issue: https://github.com/dart-lang/sdk/issues/44621
Issue: https://github.com/dart-lang/sdk/issues/38721

Change-Id: I50b3b4c31a2b839b35e3e057bd54f463b90bc55e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179540
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-01-20 18:08:25 +00:00
Daco Harkes
ac805dff54 [vm/ffi] Migrate to empty Structs to Opaque
This CL migrates empty `Struct`s to `Opaque` native types.
It stops using `.ref` on `Pointer`s to these types.
And stops using `.ref` on `Pointer<Utf8>` which will be migrated in
`package:ffi`.

Issue: https://github.com/dart-lang/sdk/issues/44622
Issue: https://github.com/dart-lang/sdk/issues/43974

Change-Id: I3aa256af7d4ceaa8ee37b1b2ada71f870f43617b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179181
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-01-15 10:52:53 +00:00
Daco Harkes
c36028b002 [vm/ffi] Migrate benchmarks/Ffi* to CallocAllocator
This CL does not yet roll `package:ffi` to use `Allocator`, because that
breaks the checked in Dart in Flutter in g3. Instead, this copies
`_CallocAllocator` from `package:ffi` into the benchmarks. (We need a
copy per benchmark such that file-copying before running benchmarks
works properly.) The copies can be deleted when we can update
`package:ffi` in the DEPS file to contain `_CallocAllocator`.

New API landed in: https://dart-review.googlesource.com/c/sdk/+/177705

Issue: https://github.com/dart-lang/sdk/issues/44621
Issue: https://github.com/dart-lang/sdk/issues/38721

Change-Id: I546de7ec65ceb6f05644a5f269b83f64656892e5
Cq-Include-Trybots: luci.dart.try:benchmark-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178995
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-01-14 12:35:58 +00:00
Stephen Adams
d5335340f4 [benchmark] BigIntParsePrint: fix lints
Change-Id: Id0b131e9127b4b57bf88d376cb17d3b3676dfa6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177740
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-01-11 17:42:06 +00:00
Stephen Adams
a5406428a5 Redo "[benchmark] Update BigIntParsePrint""
- Generate strings on one place rather than work hard to generate them
  the same with different number types.

- Update dart2 version


Change-Id: I69e6bde8b870598e062b5009578e5f8c7b2a6add
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176585
Auto-Submit: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-12-23 22:59:36 +00:00
Stephen Adams
11d51f4250 Revert "[benchmark] Update BigIntParsePrint"
This reverts commit 7ebbc89e78.

The benchmark became broken because it checks for round-trip fidelity
and using a shared list of strings there is rounding on the int.*.64
case.

I'll fix it and recommit.

TBR: whesse@google.com
Change-Id: I9ba25716992e59929726745b9414eb8dc17a55fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176580
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-12-17 18:19:24 +00:00
Stephen Adams
7ebbc89e78 [benchmark] Update BigIntParsePrint
- Generate strings on one place rather than work hard to generate them
  the same with different number types.

- Update dart2 version

Change-Id: I449d08a5ead13504ec604b11bd63b729590d6ffe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175861
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-12-17 06:32:33 +00:00
Stephen Adams
4bee6db9cf [benchmark] add int.parse benchmark
Change-Id: Ibded63c1d3fc60497bde8d19ee33e5e36edd0445
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175600
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-12-11 01:56:48 +00:00
Stephen Adams
68a57c59d7 [benchmarks] Omnibus benchmark
A benchmark that is a collection of other benchmarks.

This benchmark has two purposes:

 - As a medium sized compilation benchmark
 - As a tool for running benchmarks as part of a larger program

This benchmark is not intended to be run for the purpose of generating
benchmark timing results on Golem.

It should be extended over time to include most public benchmarks that
are meaningful on all Dart platforms.

Change-Id: I17f034cfd68d01ff5b4842b89b216fcea0d5bd3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170060
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-11-28 20:36:06 +00:00
Martin Kustermann
c3ddc5c374 [vm/concurrency] Add EventLoopLatencyJson350KB bechmark
The existing EventLoopLatencyJson benchmark exercises the *worst case scenario*:
A background isolate is stressing the GC where the working memory set
does not fit into new space. This causes scavenges to copy the entire
newspace either into the to-space or promote it to old space.

The benchmark in this CL is similar to EventLoopLatencyJson, but it's working
memory set is significantly lower than new space, therefore not
exercising this worst case scenario (this represents the most common
scenario, which we would expect for compute() function in flutter)

(Due to difficulty sharing code between benchmarks, this CL adds
similar code as EventLoopLatencyJson)

Issue https://github.com/dart-lang/sdk/issues/36097

Change-Id: I385a620ba8900082f8ca5fb9080fc23d95112e83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169100
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-10-28 16:28:38 +00:00
Martin Kustermann
c7085f211f [vm] Change EventLoopLatency benchmark to use RunTimeRaw latency
Change-Id: If1ec76839f5334d8a1e04a298b19a4211502fdeb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168830
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-10-23 18:31:01 +00:00
Jonas Termansen
80621fed03 [benchmark] Add language version comments to benchmarks.
Change-Id: I44047a9d7907d166a6360397d0047ce9b835e5c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166854
Auto-Submit: Jonas Termansen <sortie@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2020-10-13 01:43:22 +00:00
Martin Kustermann
c4027afb95 [vm/concurrency] Remove unnecessary async marker in benchmark
Change-Id: Ida65d264d83147a85b4ac0c1b8ef3f157f4d3247
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162541
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-09-14 10:58:09 +00:00
Martin Kustermann
2935fecccb [vm/concurrency] Add EventLoopLatencyJson benchmarks
Issue https://github.com/dart-lang/sdk/issues/36097

Change-Id: Ic364e7dccc15bc14832ce61e45ba6c0e241dbbc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162509
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-09-11 16:46:22 +00:00
Tess Strickland
b02925a13f [benchmarks] Adding benchmarks for dynamic closure calls.
Bug: https://github.com/dart-lang/sdk/issues/40813
Change-Id: Ifdb7dfef4fc581c14cb570a534a64d73f5be9449
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160726
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-08-28 14:49:18 +00:00
Martin Kustermann
9be24ce946 [benchmark] Import MD5/SHA1/SHA256/SkeletalAnimation/SkeletalAnimationSIMD benchmarks from benchmarks-internal
Change-Id: I8b7a740091a438babfdd05dd81423b5593d3d7e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156020
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-08-24 14:37:28 +00:00
Benjamin Prosnitz
d79ef922a5 Utf8 Encode Benchmarks
This CL adds Utf8 encode benchmarks to complement the existing Utf8
decode benchmarks. These benchmarks measure the time to process a
given input rune.

The motivation for adding this was after noticing in external
benchmarks that Dart utf8 encoding can sometimes be much slower
than the utf8 encoding in other languages. After adding benchmarks,
I plan to send CLs for some small tweaks that may improve performance.

Change-Id: I8751d7df22937e9a85b85794e3488c664c359bbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158820
Auto-Submit: Benjamin Prosnitz <bprosnitz@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2020-08-19 10:05:10 +00:00
Jonas Termansen
b6a466c61e [benchmark] Fix lint in IsolateSpawn hello world.
Change-Id: I76495ccc6afecb141e7648b202ab46da0027b582
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157260
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-08-06 11:15:20 +00:00
Aske Simon Christensen
bbcdc8dcff [benchmarks] Migrate Utf8Decode benchmark.
Change-Id: Idc5288c3df2e12e2a9d29c3102549531d46e4ff4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153081
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2020-07-01 16:53:11 +00:00
Alexander Markov
9ae1448ef0 [benchmarks] Add more test cases to ListCopy benchmarks.
This is the follow-up for the discussion on
https://dart-review.googlesource.com/c/sdk/+/152700

Change-Id: Ifeeafcdc312c4f7df7e0be1cc806b972b8c18078
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152709
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
2020-07-01 16:01:40 +00:00
Aske Simon Christensen
d56c85f6f9 [benchmarks] Migrate RuntimeType benchmark.
Change-Id: I41e97ac2eb703ba3898bfa70ce8a60946d75ee70
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153082
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2020-07-01 15:40:01 +00:00
Daco Harkes
585fa217a1 [benchmarks/ffi] Migrate benchmarks to NNBD
Change-Id: I36568f4f4d59c0a337aab82b6ca15d40495cb269
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152850
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2020-06-30 14:44:27 +00:00
Daco Harkes
f0851772e9 [benchmarks/ffi] Fix lints
Change-Id: I37fe24f122ed9da269be658b9f98b957ddfcb7fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152848
Reviewed-by: Clement Skau <cskau@google.com>
2020-06-30 14:44:27 +00:00
Alexander Markov
8ef90b8641 [benchmarks] Remove expensive Iterable.cast from NNBD version of ListCopy benchmark
Dart 2 version of this benchmark doesn't have this call.
Dart 3 (NNBD) is more strict and allows implicit casts only if casting
from dynamic, so it highlights places where types are incompatible.

However, Iterable.cast<int>() has a high overhead and it doesn't look
like a right way to suppress static type check in this case, as it
creates a new Iterable which would additionally cast each element.
Simple 'input as dynamic' cast is enough in this case and reflects
what was happening in Dart 2 case when types are incompatible.

Fixes https://github.com/dart-lang/sdk/issues/42506

Change-Id: I8d83796a53b53e6f567f533f3d5369cd29f6ad97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152700
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-06-26 22:51:08 +00:00
Regis Crelier
63cf56d925 Roll benchmarks-internal to 02695da98bcf006b95630d3c386f4169d7ec4ecf
Ignore invariant_booleans lint rule when analyzing benchmarks.

Change-Id: I6071d3c1407e9c67689204e4ceb50cc1c0c8e109
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152598
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2020-06-26 01:56:03 +00:00