-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Consider this:
julia> a_nemo, b_nemo, c_nemo = Nemo.ZZ(5), Nemo.ZZ(7), Nemo.ZZ(3)^100;
julia> a_sing, b_sing, c_sing = Singular.ZZ(5), Singular.ZZ(7), Singular.ZZ(3)^100;
julia> @b $a_nemo == $b_nemo
4.013 ns
julia> @b $a_nemo == 5
3.705 ns
julia> @b $a_nemo == $b_sing
138.743 ns (5 allocs: 96 bytes)
julia> @b $a_sing == $b_sing
52.994 ns (3 allocs: 48 bytes)
julia> @b $a_sing == 5
311.557 ns (11 allocs: 176 bytes)
Especially the last one is really bad, comparing a Singular integer to a Julia machine int should not require so many allocations.
Of course the above is just with n_Z, but it also affects n_Q and finite field elements and probably others, to varying degrees.
Metadata
Metadata
Assignees
Labels
No labels