Skip to content

Commit c3efe99

Browse files
committed
[benchmark] StringInterpolation Legacy Factor
1 parent f4de0d6 commit c3efe99

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

benchmark/single-source/StringInterpolation.swift

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,18 @@ import TestsUtils
1515
public let StringInterpolation = BenchmarkInfo(
1616
name: "StringInterpolation",
1717
runFunction: run_StringInterpolation,
18-
tags: [.validation, .api, .String])
18+
tags: [.validation, .api, .String],
19+
legacyFactor: 100)
1920
public let StringInterpolationSmall = BenchmarkInfo(
2021
name: "StringInterpolationSmall",
2122
runFunction: run_StringInterpolationSmall,
22-
tags: [.validation, .api, .String])
23+
tags: [.validation, .api, .String],
24+
legacyFactor: 10)
2325
public let StringInterpolationManySmallSegments = BenchmarkInfo(
2426
name: "StringInterpolationManySmallSegments",
2527
runFunction: run_StringInterpolationManySmallSegments,
26-
tags: [.validation, .api, .String])
28+
tags: [.validation, .api, .String],
29+
legacyFactor: 100)
2730

2831
class RefTypePrintable : CustomStringConvertible {
2932
var description: String {
@@ -38,7 +41,7 @@ public func run_StringInterpolation(_ N: Int) {
3841
let anInt: Int64 = 0x1234567812345678
3942
let aRefCountedObject = RefTypePrintable()
4043

41-
for _ in 1...100*N {
44+
for _ in 1...N {
4245
var result = 0
4346
for _ in 1...reps {
4447
let s: String = getString(
@@ -61,7 +64,7 @@ public func run_StringInterpolationSmall(_ N: Int) {
6164
let refResult = reps
6265
let anInt: Int64 = 0x42
6366

64-
for _ in 1...100*N {
67+
for _ in 1...10*N {
6568
var result = 0
6669
for _ in 1...reps {
6770
let s: String = getString(
@@ -95,7 +98,7 @@ public func run_StringInterpolationManySmallSegments(_ N: Int) {
9598
}
9699

97100
let reps = 100
98-
for _ in 1...100*N {
101+
for _ in 1...N {
99102
for _ in 1...reps {
100103
blackHole("""
101104
\(getSegment(0)) \(getSegment(1))/\(getSegment(2))_\(getSegment(3))

0 commit comments

Comments
 (0)