Skip to content

Commit 270cd70

Browse files
committed
Disable 128-bit perf tests on x86 b/c Int128 uses BigInt for 32-bit
1 parent 6af1829 commit 270cd70

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/FixedDecimal.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,9 @@ const WFD2 = FixedDecimal{Int128, 2}
339339
const UFD2 = FixedDecimal{UInt, 2}
340340
const UWFD2 = FixedDecimal{UInt128, 2}
341341

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
342345
@testset "128-bit conversion performance" begin
343346
# Baseline cases
344347
@test @allocated(convert(F64D2, Int8(-1))) == 0
@@ -366,6 +369,7 @@ const UWFD2 = FixedDecimal{UInt128, 2}
366369
@test @allocated(convert(UF64D2, UInt128(1))) == 0
367370
@test @allocated(convert(F64D2, Int128(-1))) == 0
368371
end
372+
end # if @static Int === Int64
369373

370374
@testset "BigInt conversion performance" begin
371375
b = BigInt(2)

0 commit comments

Comments
 (0)