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

7 Commits

Author SHA1 Message Date
Jonas Termansen
b6aa2976dc [benchmarks] Fix benchmarks warming up incorrectly.
The benchmarks were using a range of antipatterns that did not do what
the authors thought they did. It seems that the authors thought the
warmup method has to run for a while and do the full warmup, but the
truth is that the harness will do that for you by running the warmup
function in a timed loop. Instead these patterns just wasted time by
making the warmup more expensive and complex than needed.

This change just removes the warmup overrides since none of them do
anything positive. This change prepares us for future improvements to
the benchmark harness.

Fixes: b/324874055
Change-Id: Ib7c282123a2151614bc95a105a30e67221f11315
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352022
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2024-02-22 14:38:19 +00:00
Martin Kustermann
4d4a922638 [benchmarks] Remove unnecessary utf8.encode() as Uint8List downcast
The return type of `utf8.encode()` was made more precise in [0] (from
`List<int>` to `Uint8List`)

[0] https://dart-review.googlesource.com/c/sdk/+/254903

TEST=ci

Change-Id: I3e578ac8dc5f3f66396cb374e3dcadd989919518
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321860
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-08-21 08:21:37 +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
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
Jonas Termansen
6f66f82625 [benchmark] Fork benchmarks for null safety and pin internal ones.
This change forks the benchmarks for the null safety feature where there
now is a null safe version at benchmarks/Foo/dart and a legacy Dart 2
version at benchmarks/Foo/dart2. This change allows benchmarks to be
migrated per go/dart-nnbd-benchmark-migration.

Additionally this change pins the internal benchmarks which have been
moved into their own repository and is now versioned along with the Dart
SDK.

The dart2 implementation will be benchmarked instead of the null safe
dart implementation as of this change. The null safe dart implementation
will be used when null safe benchmarking is turned on.

Change-Id: If039fd7100c960169f4161c1d98167aca0af2ded
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148440
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-02 12:53:24 +00:00
Aske Simon Christensen
16b4cbc0df [benchmark] Adjust UTF-8 decode benchmark to reflect more typical use.
The majority of UTF-8 decoding in Dart programs is done via the
utf8.decode() call. Therefore, our benchmark should do the same to
better reflect realistic use.

Change-Id: I080edf689a8acd329bb2ee4d54a3de842f387a0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145594
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2020-05-01 15:21:13 +00:00
Aske Simon Christensen
b59217721b [benchmark] Benchmark for UTF-8 decoding with typical data.
This is in preparation for upcoming optimizations to the UTF-8 decoding.

The data files are extracts from Wikipedia with markup stripped. They
cover 6 representative cases of typical input data:
- English text, only ASCII
- Danish text, mostly ASCII, only Latin-1
- Slovak text, mostly ASCII, not only Latin-1
- Russian text, max 2 bytes per character
- Nepali text, max 3 bytes per character
- Chinese text, full character range

Each of the languages are benchmarked with small (average 10 bytes),
medium (10 000 bytes) and large (10 000 000 bytes) inputs.

Only allowMalformed: false is benchmarked.

Change-Id: I72e6959c49388f2aebf33da0c582b7729be6297c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140870
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-03-27 13:02:07 +00:00