Commit Graph

1 Commits

Author SHA1 Message Date
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