@@ -15,15 +15,18 @@ import TestsUtils
15
15
public let StringInterpolation = BenchmarkInfo (
16
16
name: " StringInterpolation " ,
17
17
runFunction: run_StringInterpolation,
18
- tags: [ . validation, . api, . String] )
18
+ tags: [ . validation, . api, . String] ,
19
+ legacyFactor: 100 )
19
20
public let StringInterpolationSmall = BenchmarkInfo (
20
21
name: " StringInterpolationSmall " ,
21
22
runFunction: run_StringInterpolationSmall,
22
- tags: [ . validation, . api, . String] )
23
+ tags: [ . validation, . api, . String] ,
24
+ legacyFactor: 10 )
23
25
public let StringInterpolationManySmallSegments = BenchmarkInfo (
24
26
name: " StringInterpolationManySmallSegments " ,
25
27
runFunction: run_StringInterpolationManySmallSegments,
26
- tags: [ . validation, . api, . String] )
28
+ tags: [ . validation, . api, . String] ,
29
+ legacyFactor: 100 )
27
30
28
31
class RefTypePrintable : CustomStringConvertible {
29
32
var description : String {
@@ -38,7 +41,7 @@ public func run_StringInterpolation(_ N: Int) {
38
41
let anInt : Int64 = 0x1234567812345678
39
42
let aRefCountedObject = RefTypePrintable ( )
40
43
41
- for _ in 1 ... 100 * N {
44
+ for _ in 1 ... N {
42
45
var result = 0
43
46
for _ in 1 ... reps {
44
47
let s : String = getString (
@@ -61,7 +64,7 @@ public func run_StringInterpolationSmall(_ N: Int) {
61
64
let refResult = reps
62
65
let anInt : Int64 = 0x42
63
66
64
- for _ in 1 ... 100 * N {
67
+ for _ in 1 ... 10 * N {
65
68
var result = 0
66
69
for _ in 1 ... reps {
67
70
let s : String = getString (
@@ -95,7 +98,7 @@ public func run_StringInterpolationManySmallSegments(_ N: Int) {
95
98
}
96
99
97
100
let reps = 100
98
- for _ in 1 ... 100 * N {
101
+ for _ in 1 ... N {
99
102
for _ in 1 ... reps {
100
103
blackHole ( """
101
104
\( getSegment ( 0 ) ) \( getSegment ( 1 ) ) / \( getSegment ( 2 ) ) _ \( getSegment ( 3 ) )
0 commit comments