Skip to content

[benchmark] FloatingPointPrinting: Fix benchmark failures #15300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions benchmark/single-source/FloatingPointPrinting.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ public func run_FloatingPointPrinting_Float80_description_small(_ N: Int) {
public func run_FloatingPointPrinting_Float_description_uniform(_ N: Int) {
let count = 100_000
let step = UInt32.max / UInt32(count)
var s = ""
for _ in 0..<N {
for i in 0..<count {
let raw = UInt32(i) * step
Expand All @@ -133,7 +132,6 @@ public func run_FloatingPointPrinting_Float_description_uniform(_ N: Int) {
public func run_FloatingPointPrinting_Double_description_uniform(_ N: Int) {
let count = 100_000
let step = UInt64.max / UInt64(count)
var s = ""
for _ in 0..<N {
for i in 0..<count {
let raw = UInt64(i) * step
Expand All @@ -151,7 +149,6 @@ public func run_FloatingPointPrinting_Float80_description_uniform(_ N: Int) {
#if arch(x86_64) || arch(i386)
let count = 100_000
let step = UInt64.max / UInt64(count)
var s = ""
for _ in 0..<N {
for i in 0..<count {
let fraction = UInt64(i) * step
Expand All @@ -172,30 +169,26 @@ public func run_FloatingPointPrinting_Float80_description_uniform(_ N: Int) {
public func run_FloatingPointPrinting_Float_interpolated(_ N: Int) {
let count = 100_000
let step = UInt32.max / UInt32(count)
var s = ""
for _ in 0..<N {
for i in 0..<count {
let raw = UInt32(i) * step
let f = Float(bitPattern: raw)
blackHole("and the actual result was \(f)")
}
}
CheckResults(s.count > 1)
}

@inline(never)
public func run_FloatingPointPrinting_Double_interpolated(_ N: Int) {
let count = 100_000
let step = UInt64.max / UInt64(count)
var s = ""
for _ in 0..<N {
for i in 0..<count {
let raw = UInt64(i) * step
let f = Double(bitPattern: raw)
blackHole("and the actual result was \(f)")
}
}
CheckResults(s.count > 1)
}

@inline(never)
Expand All @@ -206,7 +199,6 @@ public func run_FloatingPointPrinting_Float80_interpolated(_ N: Int) {
#if arch(x86_64) || arch(i386)
let count = 100_000
let step = UInt64.max / UInt64(count)
var s = ""
for _ in 0..<N {
for i in 0..<count {
let fraction = UInt64(i) * step
Expand All @@ -215,7 +207,6 @@ public func run_FloatingPointPrinting_Float80_interpolated(_ N: Int) {
blackHole("and the actual result was \(f)")
}
}
CheckResults(s.count > 1)
#endif // x86
#endif // Darwin/Linux
}
Expand Down