1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-08 12:06:26 +00:00
dart-sdk/benchmarks/SoundSplayTreeSieve/dart
Eric Seidel 4c20cedd30 Fix analysis issues in benchmarks/ directory
Now that I'm able to open the entire SDK in VSC, I'm fixing some
of the analysis issues in various files (carefully) without changing
their meaning.

In this case, I removed unnecessary imports from benchmarks.
In regexp_benchmark I ignored one warning which likely would
have changed the behavior of the code.

BUG=https://github.com/dart-lang/sdk/issues/52419

Change-Id: I9a195a4e45121313bd9f065f2579a165c3fec05b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303901
Auto-Submit: Eric Seidel <eric@shorebird.dev>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2023-05-17 09:14:50 +00:00
..
analysis_options.yaml - migrate sound_splay_tree.dart to null safety 2023-04-05 15:57:33 +00:00
iterable.dart Fix analysis issues in benchmarks/ directory 2023-05-17 09:14:50 +00:00
README.md
sound_splay_tree.dart Fix analysis issues in benchmarks/ directory 2023-05-17 09:14:50 +00:00
SoundSplayTreeSieve.dart Fix analysis issues in benchmarks/ directory 2023-05-17 09:14:50 +00:00

SoundSplayTreeSieve

The SoundSplayTreeSieve benchmark reports the runtime of the sieve9 Golem benchmark for a SplayTreeSet from dart:collection and a SoundSplayTreeSet that declares variance modifiers for its type parameters.

Running the benchmark

These are instructions for running the benchmark, assuming you are in the sdk directory.

These benchmarks print a result similar to this (with varying runtimes):

CollectionSieves-SplayTreeSet-removeLoop(RunTime): 4307.52688172043 us.
CollectionSieves-SoundSplayTreeSet-removeLoop(RunTime): 4344.902386117137 us.

Dart2JS

$ sdk/bin/dart2js_developer benchmarks/SoundSplayTreeSieve/dart/SoundSplayTreeSieve.dart --enable-experiment=variance --experiment-new-rti --out=soundsplay_d2js.js
$ third_party/d8/linux/d8 soundsplay_d2js.js

Dart2JS (Omit implicit checks)

$ sdk/bin/dart2js_developer benchmarks/SoundSplayTreeSieve/dart/SoundSplayTreeSieve.dart --enable-experiment=variance --experiment-new-rti --omit-implicit-checks --out=soundsplay_d2js_omit.js --lax-runtime-type-to-string
$ third_party/d8/linux/d8 soundsplay_d2js_omit.js

DDK

$ pkg/dev_compiler/tool/ddb -d -r chrome --enable-experiment=variance -k benchmarks/SoundSplayTreeSieve/dart/SoundSplayTreeSieve.dart