Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement is_squarefree for QQ/ZZPolyRingElem #1742

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fingolfin
Copy link
Member

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

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
Copy link
Member Author

Aha. I guess the reason I did not submit it back then is that it runs into issue #1311 (which I completely forgot about), at least for ZZPolyRingElem (I am really glad we have these problematic cases covered by our test suite)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant