mirror of
https://github.com/dart-lang/sdk
synced 2024-09-04 16:03:44 +00:00
![]() 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> |
||
---|---|---|
.. | ||
iterable.dart | ||
README.md | ||
sound_splay_tree.dart | ||
SoundSplayTreeSieve.dart |
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