Commit graph

3 commits

Author SHA1 Message Date
William Hesse 36be5e7318 Avoid lint warning in TearOff benchmark
The throw_in_finally lint rule, which prohibits use of throw
in finally blocks, is enabled in benchmarks/analysis_options.yaml.

This change removes violations of this lint, so IDEs don't show
problems with this file when analyzing the SDK.

Bug: https://github.com/dart-lang/sdk/issues/54808
Change-Id: Idace8fb88ac26b86c2abd73787aafdee6f188af1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360720
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2024-04-09 14:40:23 +00:00
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
Alexander Markov e7eb0aaa20 [benchmarks] Add benchmark for taking tear-offs repeatedly
Issue: https://github.com/dart-lang/sdk/issues/54808
Change-Id: Ice28033bab71e30f9a586564d7e55d9c4f5ce770
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350640
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-02-07 15:16:19 +00:00