File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -63,21 +63,23 @@ public func run_SubstringFromLongStringGeneric(_ n: Int) {
63
63
}
64
64
}
65
65
66
- @inline ( never)
67
- public func run_StringFromLongWholeSubstring( _ n: Int ) {
66
+ private func getLongWideRealBuffer( ) -> String {
68
67
var s0 = longWide
69
68
s0 += " ! " // ensure the string has a real buffer
70
- let s = Substring ( s0)
69
+ return s0
70
+ }
71
+
72
+ @inline ( never)
73
+ public func run_StringFromLongWholeSubstring( _ n: Int ) {
74
+ let s = Substring ( getLongWideRealBuffer ( ) )
71
75
for _ in 1 ... n*500 {
72
76
blackHole ( String ( s) )
73
77
}
74
78
}
75
79
76
80
@inline ( never)
77
81
public func run_StringFromLongWholeSubstringGeneric( _ n: Int ) {
78
- var s0 = longWide
79
- s0 += " ! " // ensure the string has a real buffer
80
- let s = Substring ( s0)
82
+ let s = Substring ( getLongWideRealBuffer ( ) )
81
83
for _ in 1 ... n*500 {
82
84
create ( String . self, from: s)
83
85
}
You can’t perform that action at this time.
0 commit comments