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

10 Commits

Author SHA1 Message Date
Martin Kustermann
af1b5b8044 [dart2wasm] Switch binaryen optimization levels from -O3 to -Os
We want dart2wasm be comparable to dart2js / dart2aot, the ladder two
are much more conservative with inlining compared to current dart2wasm.

The -O3 is described in the binaryen sources as agressive for
performance and therefore willing to compromise code size.

The -Os is more nuanced: It will perform many optimizations that are
done in -O3 (and e.g. not in -O2) but it will make inlining less
agressive.

This reduces flute compile-time by 10% and code size by 10%
This benchmark results are mixed (some things get faster, some things
slower). Naturally there'll be specialized micro benchmarks that
get hit hard by this.

Where performance matters we should rather make dart2wasm use better
inlining heuristics and annotate code with
`@pragma('wasm:prefer-inline')`

Change-Id: Idf7e75e4e385629c9cec66359efe0afe50db3e72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352523
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-02-14 13:45:13 +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
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
0a6a4a24ba [benchmarks] Migrate Calls benchmark to NNBD
Mostly just satisfying new analyzer lints.

Change-Id: Ib3d0f5d216659fcbab6c6f5a3db6383dc965f73d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151523
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2020-06-23 05:41:57 +00:00
Jonas Termansen
331eb0ac22 [benchmark] Synchronize Calls benchmark changes to dart2 implementation.
https://dart-review.googlesource.com/c/sdk/+/149493 changed the dart
implementation of the benchmark but did not update the dart2
implementation following the benchmark null safety fork.

Change-Id: Ic38a9c4e341cd9c5990121bbf54c117a52eedf44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149843
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-03 11:03:48 +00:00
Jonas Termansen
0dcccbbe8f [benchmark] Format all benchmarks.
Change-Id: I6f47eb18e685d55513cc452358c1f96a48a7d658
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149840
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-03 10:35:04 +00:00
Alexander Markov
f9eb40cc79 [vm/nnbd] Migate runtime/tests/vm/dart/* tests to NNBD
This change actually migrates vm/dart/* tests to NNBD by fixing
compile-time errors and adjusting tests where needed.

vm/dart/null_float32x4_simd_ops_test and vm/dart/null_float64x2_simd_ops_test
are deleted as they are superseded by static type checks.

vm/dart/regress_40462_test.dart is a huge source code auto-generated
by fuzzer and migrating and maintaining this source doesn't have much
value, so it is deleted.

There are still failures in strong mode due to dependencies on
the packages which are not migrated yet (https://github.com/dart-lang/sdk/issues/42146).

Migrated vm/dart/null_checks_with_dwarf_stack_traces_test fails both in
weak and strong mode due to https://github.com/dart-lang/sdk/issues/42149.

Issue: https://github.com/dart-lang/sdk/issues/41314
Change-Id: I5561f1c8705ec16def0c4e0efa495d15f4ea7259
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149493
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-06-02 22:49:09 +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
Alexander Markov
9bba7323a0 [benchmarks/nnbd] Fix NNBD compile-time errors in benchmarks/Calls
Fixes compile-time errors in vm/dart/async_igoto_threshold_flag_test
which uses Calls benchmark.

Change-Id: I1e3d075bb7f40516c5319e4eb4ebf7dc5b2c7ccb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146700
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-05-05 21:07:33 +00:00
Martin Kustermann
1fcaa26004 [vm/benchmarks] Add sync/sync*/async/async* call benchmarks
Change-Id: Ic29dd0fbcc524cdcd83c5c60eedfcf9db55001e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113186
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-08-22 12:21:19 +00:00