Skip to content

Commit 2e8fa85

Browse files
authored
Merge pull request #15300 from lorentey/benchmark-fix
[benchmark] FloatingPointPrinting: Fix benchmark failures
2 parents 900c01f + 06c33c0 commit 2e8fa85

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

benchmark/single-source/FloatingPointPrinting.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ public func run_FloatingPointPrinting_Float80_description_small(_ N: Int) {
119119
public func run_FloatingPointPrinting_Float_description_uniform(_ N: Int) {
120120
let count = 100_000
121121
let step = UInt32.max / UInt32(count)
122-
var s = ""
123122
for _ in 0..<N {
124123
for i in 0..<count {
125124
let raw = UInt32(i) * step
@@ -133,7 +132,6 @@ public func run_FloatingPointPrinting_Float_description_uniform(_ N: Int) {
133132
public func run_FloatingPointPrinting_Double_description_uniform(_ N: Int) {
134133
let count = 100_000
135134
let step = UInt64.max / UInt64(count)
136-
var s = ""
137135
for _ in 0..<N {
138136
for i in 0..<count {
139137
let raw = UInt64(i) * step
@@ -151,7 +149,6 @@ public func run_FloatingPointPrinting_Float80_description_uniform(_ N: Int) {
151149
#if arch(x86_64) || arch(i386)
152150
let count = 100_000
153151
let step = UInt64.max / UInt64(count)
154-
var s = ""
155152
for _ in 0..<N {
156153
for i in 0..<count {
157154
let fraction = UInt64(i) * step
@@ -172,30 +169,26 @@ public func run_FloatingPointPrinting_Float80_description_uniform(_ N: Int) {
172169
public func run_FloatingPointPrinting_Float_interpolated(_ N: Int) {
173170
let count = 100_000
174171
let step = UInt32.max / UInt32(count)
175-
var s = ""
176172
for _ in 0..<N {
177173
for i in 0..<count {
178174
let raw = UInt32(i) * step
179175
let f = Float(bitPattern: raw)
180176
blackHole("and the actual result was \(f)")
181177
}
182178
}
183-
CheckResults(s.count > 1)
184179
}
185180

186181
@inline(never)
187182
public func run_FloatingPointPrinting_Double_interpolated(_ N: Int) {
188183
let count = 100_000
189184
let step = UInt64.max / UInt64(count)
190-
var s = ""
191185
for _ in 0..<N {
192186
for i in 0..<count {
193187
let raw = UInt64(i) * step
194188
let f = Double(bitPattern: raw)
195189
blackHole("and the actual result was \(f)")
196190
}
197191
}
198-
CheckResults(s.count > 1)
199192
}
200193

201194
@inline(never)
@@ -206,7 +199,6 @@ public func run_FloatingPointPrinting_Float80_interpolated(_ N: Int) {
206199
#if arch(x86_64) || arch(i386)
207200
let count = 100_000
208201
let step = UInt64.max / UInt64(count)
209-
var s = ""
210202
for _ in 0..<N {
211203
for i in 0..<count {
212204
let fraction = UInt64(i) * step
@@ -215,7 +207,6 @@ public func run_FloatingPointPrinting_Float80_interpolated(_ N: Int) {
215207
blackHole("and the actual result was \(f)")
216208
}
217209
}
218-
CheckResults(s.count > 1)
219210
#endif // x86
220211
#endif // Darwin/Linux
221212
}

0 commit comments

Comments
 (0)