@@ -8,11 +8,13 @@ public let SortIntPyramids = [
8
8
BenchmarkInfo (
9
9
name: " SortIntPyramid " ,
10
10
runFunction: run_SortIntPyramid,
11
- tags: [ . validation, . api, . algorithm] ) ,
11
+ tags: [ . validation, . api, . algorithm] ,
12
+ legacyFactor: 5 ) ,
12
13
BenchmarkInfo (
13
14
name: " SortAdjacentIntPyramids " ,
14
15
runFunction: run_SortAdjacentIntPyramids,
15
- tags: [ . validation, . api, . algorithm] ) ,
16
+ tags: [ . validation, . api, . algorithm] ,
17
+ legacyFactor: 5 ) ,
16
18
]
17
19
18
20
// let A - array sorted in ascending order,
@@ -51,7 +53,7 @@ let adjacentPyramidsTemplate: [Int] = (1...aPH) + (1...aPH).reversed()
51
53
52
54
@inline ( never)
53
55
public func run_SortIntPyramid( _ N: Int ) {
54
- for _ in 1 ... 25 * N {
56
+ for _ in 1 ... 5 * N {
55
57
var pyramid = pyramidTemplate
56
58
57
59
// sort pyramid in place.
@@ -64,7 +66,7 @@ public func run_SortIntPyramid(_ N: Int) {
64
66
65
67
@inline ( never)
66
68
public func run_SortAdjacentIntPyramids( _ N: Int ) {
67
- for _ in 1 ... 25 * N {
69
+ for _ in 1 ... 5 * N {
68
70
var adjacentPyramids = adjacentPyramidsTemplate
69
71
adjacentPyramids. sort ( )
70
72
// Check whether pyramid is sorted.
0 commit comments