|
11 | 11 | //===----------------------------------------------------------------------===//
|
12 | 12 | import TestsUtils
|
13 | 13 |
|
| 14 | +let t: [BenchmarkCategory] = [.validation, .api, .algorithm, .String] |
14 | 15 | // Sort an array of strings using an explicit sort predicate.
|
15 | 16 | public let SortStrings = [
|
16 |
| - BenchmarkInfo(name: "SortSortedStrings", runFunction: run_SortSortedStrings, tags: [.validation, .api, .algorithm, .String], |
| 17 | + BenchmarkInfo(name: "SortSortedStrings", |
| 18 | + runFunction: run_SortSortedStrings, tags: t, |
17 | 19 | setUpFunction: { blackHole(sortedWords) }),
|
18 |
| - BenchmarkInfo(name: "SortStrings", runFunction: run_SortStrings, tags: [.validation, .api, .algorithm, .String], |
| 20 | + BenchmarkInfo(name: "SortStrings", |
| 21 | + runFunction: run_SortStrings, tags: t, |
19 | 22 | setUpFunction: { blackHole(words) }),
|
20 |
| - BenchmarkInfo(name: "SortStringsUnicode", runFunction: run_SortStringsUnicode, tags: [.validation, .api, .algorithm, .String], |
21 |
| - setUpFunction: { blackHole(unicodeWords) }), |
| 23 | + BenchmarkInfo(name: "SortStringsUnicode", |
| 24 | + runFunction: run_SortStringsUnicode, tags: t, |
| 25 | + setUpFunction: { blackHole(unicodeWords) }, legacyFactor: 5), |
22 | 26 | ]
|
23 | 27 |
|
24 | 28 | let sortedWords = words.sorted()
|
@@ -2050,7 +2054,7 @@ var unicodeWords: [String] = [
|
2050 | 2054 | ]
|
2051 | 2055 |
|
2052 | 2056 | public func run_SortStringsUnicode(_ N: Int) {
|
2053 |
| - for _ in 1...5*N { |
| 2057 | + for _ in 1...N { |
2054 | 2058 | benchSortStrings(unicodeWords)
|
2055 | 2059 | }
|
2056 | 2060 | }
|
0 commit comments