We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86699a7 commit 9a23fdfCopy full SHA for 9a23fdf
Tests/RealTests/RelaxedArithmeticTests.swift
@@ -34,10 +34,14 @@ func relaxedSumOfSquares<T: Real>(_ array: [T]) -> T {
34
35
// TODO: not a great harness, but making it better bumps up against the
36
// limitations of what XCT measure { } lets us do easily. Good enough for now.
37
-@_transparent
38
-func benchmarkReduction<T: Real>(_ data: [T], _ reduction: ([T]) -> T) {
39
- var accum: T = 0
40
- for _ in 0 ..< 10_000 {
+func benchmarkReduction(_ data: [Float], _ reduction: ([Float]) -> Float) {
+ var accum: Float = 0
+#if DEBUG
+ let iters = 1_000
41
+#else
42
+ let iters = 100_000
43
+#endif
44
+ for _ in 0 ..< iters {
45
accum += reduction(data)
46
}
47
blackHole(accum)
0 commit comments