@@ -338,36 +338,36 @@ const UWFD2 = FixedDecimal{UInt128, 2}
338
338
339
339
@testset " 128-bit conversion performance" begin
340
340
# Baseline cases
341
- @test @allocated (Base . convert (FD2, Int8 (- 1 ))) == 0
342
- @test @allocated (Base . convert (FD2, UInt8 (1 ))) == 0
343
- @test @allocated (Base . convert (SFD2, Int8 (- 1 ))) == 0
341
+ @test @allocated (convert (FD2, Int8 (- 1 ))) == 0
342
+ @test @allocated (convert (FD2, UInt8 (1 ))) == 0
343
+ @test @allocated (convert (SFD2, Int8 (- 1 ))) == 0
344
344
345
345
# Int 128 cases
346
- @test @allocated (Base . convert (WFD2, 1 )) == 0
347
- @test @allocated (Base . convert (WFD2, 1 )) == 0
348
- @test @allocated (Base . convert (UWFD2, 1 )) == 0
349
- @test @allocated (Base . convert (WFD2, - 1 )) == 0
350
- # @test @allocated(Base. convert(UWFD2, -1)) == 32 # not sure how best to test this
351
- @test @allocated (Base . convert (WFD2, UInt (1 ))) == 0
352
- @test @allocated (Base . convert (UWFD2, UInt (1 ))) == 0
353
-
354
- @test @allocated (Base . convert (WFD2, Int128 (1 ))) == 0
355
- @test @allocated (Base . convert (UWFD2, Int128 (1 ))) == 0
356
- @test @allocated (Base . convert (WFD2, UInt128 (1 ))) == 0
357
- @test @allocated (Base . convert (UWFD2, UInt128 (1 ))) == 0
358
- @test @allocated (Base . convert (WFD2, Int128 (- 1 ))) == 0
359
-
360
- @test @allocated (Base . convert (FD2, Int128 (1 ))) == 0
361
- @test @allocated (Base . convert (UFD2, Int128 (1 ))) == 0
362
- @test @allocated (Base . convert (FD2, UInt128 (1 ))) == 0
363
- @test @allocated (Base . convert (UFD2, UInt128 (1 ))) == 0
364
- @test @allocated (Base . convert (FD2, Int128 (- 1 ))) == 0
346
+ @test @allocated (convert (WFD2, 1 )) == 0
347
+ @test @allocated (convert (WFD2, 1 )) == 0
348
+ @test @allocated (convert (UWFD2, 1 )) == 0
349
+ @test @allocated (convert (WFD2, - 1 )) == 0
350
+ # @test @allocated(convert(UWFD2, -1)) == 32 # not sure how best to test this
351
+ @test @allocated (convert (WFD2, UInt (1 ))) == 0
352
+ @test @allocated (convert (UWFD2, UInt (1 ))) == 0
353
+
354
+ @test @allocated (convert (WFD2, Int128 (1 ))) == 0
355
+ @test @allocated (convert (UWFD2, Int128 (1 ))) == 0
356
+ @test @allocated (convert (WFD2, UInt128 (1 ))) == 0
357
+ @test @allocated (convert (UWFD2, UInt128 (1 ))) == 0
358
+ @test @allocated (convert (WFD2, Int128 (- 1 ))) == 0
359
+
360
+ @test @allocated (convert (FD2, Int128 (1 ))) == 0
361
+ @test @allocated (convert (UFD2, Int128 (1 ))) == 0
362
+ @test @allocated (convert (FD2, UInt128 (1 ))) == 0
363
+ @test @allocated (convert (UFD2, UInt128 (1 ))) == 0
364
+ @test @allocated (convert (FD2, Int128 (- 1 ))) == 0
365
365
end
366
366
367
367
@testset " BigInt conversion performance" begin
368
368
b = BigInt (2 )
369
369
# Special-cased f=1 to not allocate for BigInt => FD conversion
370
- @test @allocated (Base . convert (FixedDecimal{BigInt, 1 }, b)) == 0
370
+ @test @allocated (convert (FixedDecimal{BigInt, 1 }, b)) == 0
371
371
end
372
372
373
373
end # module PerfTests
0 commit comments