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

HACK: add faster arithmetic for UnivPoly and ZZRingElem #203

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

Conversation

fingolfin
Copy link
Member

This is not meant to be merged, just serve as a reminder: arithmetic for UnivPoly could be quite a bit more efficient. The methods added here help concrete computations in the method (R::GenericCycloRing)(f::Dict{UPolyFrac, UPoly}; simplify::Bool=true).

But they are not going far enough and are incomplete. Someone should patch AA (and perhaps Nemo) to add...

  • add!, sub!, mul! methods in AA looking like this:
    function add!(a::UnivPoly{T}, b::UnivPoly{T}, c::Any) where {T <: RingElement}
       a.p = add!(a.p, b.p, c)
       return a
    end
    (One may argue whether c should be restricted to e.g. RingElement but I think for this kind of fallback it has no advantage?)
  • we should also add addmul! (there also in the variant which takes three UnivPoly)
  • then of course improved +, -, * etc. methods possibly based on the new add!, sub!, mul! methods

Copy link

codecov bot commented Sep 27, 2024

Codecov Report

Attention: Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 95.44%. Comparing base (32a11a5) to head (f739fa1).

Files with missing lines Patch % Lines
src/GenericCyclotomics.jl 70.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #203      +/-   ##
==========================================
- Coverage   95.77%   95.44%   -0.33%     
==========================================
  Files          13       13              
  Lines         781      791      +10     
==========================================
+ Hits          748      755       +7     
- Misses         33       36       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant