Commit graph

7 commits

Author SHA1 Message Date
Jens Johansen 16289b490d [CFE] Benchmarks for list copy, mapping etc.
On my computer:

1) If creating a Set from a list mapping simply adding
   each entry to the set seems faster.
2) When mapping a list to a new list using `List.generate`
  seems to be the fastest. Prefer `growable: false` if not
  needing it to be growable.
3) When creating a new list `.of` seems faster than `.from`.

Change-Id: I7f3d66100246e170cf09431dddf64b3ec39579f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228643
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-01-24 14:40:26 +00:00
Jens Johansen 497eda096a [CFE] Add benchmark for list generation via alternative methods
Change-Id: I6f2f9a02252a27e4c87b41d95ed292ccc9ec0779
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228203
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-01-17 09:14:24 +00:00
Johnni Winther ba98ca1be1 [cfe] Add measurement for patterns
This CL adds an initial framework for testing performance of programming
patterns. Included is a test of the pattern used to choose
implementation based on a runtime type, using either an if-then-else
sequence, dynamic dispatch on the runtime object, or visitor pattern.

The test framework runs the patterns on a range of inputs using a
predefined set of scenarios and outputs a table of the measurements which
can be copied into Google Sheets to visualize the results.

Further work is to use statistics to quantify the results, and expand
the framework to be used to detect asymptotic performance of algorithms
used in the compiler itself.

Change-Id: Ic99588d13adead309715957e1bc0aa6def46c9dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226104
Reviewed-by: Jens Johansen <jensj@google.com>
2022-01-06 15:15:58 +00:00
Johnni Winther a6cc772b67 [cfe] Add always_declare_return_types lint
Change-Id: I206a7a8132b5ea79dc019acf5c2e0cd800307bcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212161
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-09-02 08:07:23 +00:00
Johnni Winther 34fb48bb8a [kernel,front_end] Migrate first wave of pkg/kernel and pkg/front_end
Migrates libraries dependent only on already migrated libraries.

Change-Id: I0e85ee8dbc2afce031b92e0009e71c206a55af28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179502
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-01-18 15:40:21 +00:00
Martin Kustermann 1d855b0067 Smaller changes to incremental_perf.dart, this is preparation for the flutter IKG perf benchmark
Amonst other things, it allows edits to reference package:<name> uris.

Change-Id: Iff90d5841901b5a003473e7086a266ccdcf94ad3
Reviewed-on: https://dart-review.googlesource.com/21540
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-11-17 10:34:12 +00:00
Martin Kustermann ff41877e04 Update incremental_perf.dart to use named changesets, add IKG benchmarks
Change-Id: I24d1e10bff363f021e201afbb996299f2c6a860d
Reviewed-on: https://dart-review.googlesource.com/13160
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-10-12 11:17:48 +00:00