#13596: Improvements to IntegerMod is_square
-------------------------------+-------------------------------------------
       Reporter:  roed         |        Owner:  AlexGhitza
           Type:  enhancement  |       Status:  needs_work
       Priority:  major        |    Milestone:  sage-5.12
      Component:  basic        |   Resolution:
  arithmetic                   |    Merged in:
       Keywords:               |    Reviewers:  Francis Clarke, Peter Bruin
        Authors:  David Roe    |  Work issues:
Report Upstream:  N/A          |       Commit:
         Branch:               |     Stopgaps:
   Dependencies:  #12415       |
-------------------------------+-------------------------------------------

Comment (by pbruin):

 After experimenting with various mixtures of Cython and PARI, I believe
 that the most efficient solution is to use Cython for those checks for
 non-squareness that don't require factoring, and if that fails, call
 PARI's `Zn_issquare` function with the modulus in factored form.  I made a
 patch and am now running doctests.

 There seems to be a very slight slowdown with respect to the current
 implementation if the element is a square (perhaps because the above quick
 tests are done once in Cython and again in PARI), but a noticeable speedup
 if it is not.

--
Ticket URL: <http://trac.sagemath.org/ticket/13596#comment:15>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to