Open kalmarek opened 3 years ago
With #108 we now have
julia> @btime ArbMatrix(rand(Arb(prec=256), 100,100));
2.647 ms (50007 allocations: 3.21 MiB)
julia> @btime ArbMatrix(rand(Arb, 100,100));
2.657 ms (50006 allocations: 3.21 MiB)
So they are equal!
We also have
julia> @btime ArbMatrix(rand($BigFloat, 100, 100));
1.827 ms (30006 allocations: 2.06 MiB)
julia> @btime ArbMatrix(Arb.(rand($BigFloat, 100, 100)));
1.988 ms (50008 allocations: 3.28 MiB)
julia> @btime ArbMatrix(rand($Arb, 100, 100));
2.895 ms (50006 allocations: 3.21 MiB)
It's natural that the first one is faster since it avoids one copy of each Arb
. The two last ones have the same number of allocations but they are not equally fast, I'm not entirely sure why this is the case.
Notice that we still have the same problems as before with Acb
.
very well, thanks!
as observed in #82:
i.e. 6 allocations per entry despite
Also:
i.e. I botched random API :P