@@ -17,16 +17,6 @@ import Darwin
1717#endif
1818
1919public enum BenchmarkCategories {
20- // Optimized benchmarks cover performance areas that have already been
21- // investigated and optimized to some reasonable level. We expect these to be
22- // "representative" of Swift perforance.
23- case optimized
24-
25- // Most benchmarks are assumed to be "stable" and will be regularly tracked at
26- // each commit. A handful may be marked unstable if continually tracking them is
27- // counterproductive.
28- case unstable
29-
3020// Validation "micro" benchmarks test a specific operation or critical path that
3121// we know is important to measure.
3222case validation
@@ -53,9 +43,28 @@ case miniapplication
5343// report. We want to make sure the optimizer as a whole continues to handle
5444// this case, but don't know how applicable it is to general Swift performance
5545// relative to the other micro-benchmarks. In particular, these aren't weighted
56- // as highly as "validation" benchmarks and likely won't be the subject of future
57- // investigation unless they significantly regress.
46+ // as highly as "validation" benchmarks and likely won't be the subject of
47+ // future investigation unless they significantly regress.
5848case regression
49+
50+ // Most benchmarks are assumed to be "stable" and will be regularly tracked at
51+ // each commit. A handful may be marked unstable if continually tracking them is
52+ // counterproductive.
53+ case unstable
54+
55+ // CPU benchmarks represent instrinsic Swift performance. They are useful for
56+ // measuring a fully baked Swift implementation across different platforms and
57+ // hardware. The benchmark should also be reasonably applicable to real Swift
58+ // code--it should exercise a known performance critical area. Typically these
59+ // will be drawn from the validation benchmarks once the language and standard
60+ // library implementation of the benchmark meets a reasonable efficiency
61+ // baseline. A benchmark should only be tagged "cpubench" after a full
62+ // performance investigation of the benchmark has been completed to determine
63+ // that it is a good representation of future Swift performance. Benchmarks
64+ // should not be tagged if they make use of an API that we plan on
65+ // reimplementing or call into code paths that have known opportunities for
66+ // significant optimization.
67+ case cpubench
5968}
6069
6170public struct BenchmarkInfo {
0 commit comments