File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -339,6 +339,9 @@ const WFD2 = FixedDecimal{Int128, 2}
339
339
const UFD2 = FixedDecimal{UInt, 2 }
340
340
const UWFD2 = FixedDecimal{UInt128, 2 }
341
341
342
+ # These perf tests only make sense on 64-bit architectures, since 32-bit architectures
343
+ # use BigInts to implement Int128, so there will be allocations for many of these tests.
344
+ @static if Int === Int64
342
345
@testset " 128-bit conversion performance" begin
343
346
# Baseline cases
344
347
@test @allocated (convert (F64D2, Int8 (- 1 ))) == 0
@@ -366,6 +369,7 @@ const UWFD2 = FixedDecimal{UInt128, 2}
366
369
@test @allocated (convert (UF64D2, UInt128 (1 ))) == 0
367
370
@test @allocated (convert (F64D2, Int128 (- 1 ))) == 0
368
371
end
372
+ end # if @static Int === Int64
369
373
370
374
@testset " BigInt conversion performance" begin
371
375
b = BigInt (2 )
You can’t perform that action at this time.
0 commit comments