Skip to content

Commit 3aeead4

Browse files
committed
Fiddle with the iteration count and length
1 parent 068ef83 commit 3aeead4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

benchmark/single-source/Substring.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ let longWide = "fὢasὢodὢijὢadὢolὢsjὢalὢsdὢjlὢasὢdfὢijὢ
3636
let (s1, ss1) = equivalentWithDistinctBuffers()
3737
let (s2, ss2) = equivalentWithDistinctBuffers()
3838

39-
let quiteLong = String(repeating: "0", count: 10_000)
39+
let quiteLong = String(repeating: "0", count: 15_000)[...]
4040

4141
@inline(never)
4242
public func run_SubstringFromLongString(_ N: Int) {
@@ -132,16 +132,16 @@ public func run_EqualSubstringSubstringGenericEquatable(_ N: Int) {
132132

133133
@inline(never)
134134
public func run_SubstringDropFirst1(_ N: Int) {
135-
let s = quiteLong[...]
136-
for _ in 1...N*500 {
135+
let s = quiteLong
136+
for _ in 1...N*1000 {
137137
blackHole(!s.dropFirst(1).isEmpty)
138138
}
139139
}
140140

141141
@inline(never)
142142
public func run_SubstringDropLast1(_ N: Int) {
143-
let s = quiteLong[...]
144-
for _ in 1...N*500 {
143+
let s = quiteLong
144+
for _ in 1...N*1000 {
145145
blackHole(!s.dropLast(1).isEmpty)
146146
}
147147
}

0 commit comments

Comments
 (0)