File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ public let FloatingPointConversion = [
18
18
runFunction: run_ConvertFloatingPoint_MockFloat64ToDouble,
19
19
tags: [ . validation, . api] ,
20
20
setUpFunction: { blackHole ( mockFloat64s) } ) ,
21
+ BenchmarkInfo (
22
+ name: " ConvertFloatingPoint.MockFloat64ToInt64 " ,
23
+ runFunction: run_ConvertFloatingPoint_MockFloat64ToInt64,
24
+ tags: [ . validation, . api] ,
25
+ setUpFunction: { blackHole ( mockFloat64s) } ) ,
21
26
]
22
27
23
28
protocol MockBinaryFloatingPoint : BinaryFloatingPoint {
@@ -160,3 +165,13 @@ public func run_ConvertFloatingPoint_MockFloat64ToDouble(_ N: Int) {
160
165
}
161
166
}
162
167
}
168
+
169
+ @inline ( never)
170
+ public func run_ConvertFloatingPoint_MockFloat64ToInt64( _ N: Int ) {
171
+ for _ in 0 ..< ( N * 1000 ) {
172
+ for element in mockFloat64s {
173
+ let i = Int64 ( identity ( element) )
174
+ blackHole ( i)
175
+ }
176
+ }
177
+ }
You can’t perform that action at this time.
0 commit comments