Nemo.jl icon indicating copy to clipboard operation
Nemo.jl copied to clipboard

Implement is_squarefree for QQ/ZZPolyRingElem

Open fingolfin opened this issue 2 months ago • 1 comments

Cleaning out old branches; I made this last November, not sure why I never submitted. The new methods replace generic code, so this is purely about making things a bit faster.

Before:

julia> S, y = polynomial_ring(QQ, "y")
(Univariate polynomial ring in y over QQ, y)

julia> @btime is_squarefree(2*y^2)
  522.349 ns (14 allocations: 576 bytes)
false

After:

julia> S, y = polynomial_ring(QQ, "y")
(Univariate polynomial ring in y over QQ, y)

julia> @btime is_squarefree(2*y^2)
  151.743 ns (4 allocations: 176 bytes)
false

fingolfin avatar Apr 29 '24 20:04 fingolfin