#13981: Faster int -> Integer coercion for common ints
------------------------------------+---------------------------------------
       Reporter:  robertwb          |         Owner:  AlexGhitza
           Type:  enhancement       |        Status:  needs_info
       Priority:  major             |     Milestone:  sage-5.7  
      Component:  basic arithmetic  |    Resolution:            
       Keywords:                    |   Work issues:            
Report Upstream:  N/A               |     Reviewers:            
        Authors:                    |     Merged in:            
   Dependencies:  #12615            |      Stopgaps:            
------------------------------------+---------------------------------------

Comment (by robertwb):

 Ticket #12615 is a dependency, you need to apply that first.

 I can't think of any standard efficiency tests, but this is most useful
 when creating a large number of small Sage integers. For example,

 Before:

 {{{
 sage: sage: E = EllipticCurve('37a')
 sage: sage: v = E.anlist(10000, python_ints=True)
 sage: sage: %timeit [ZZ(a) for a in v]
 25 loops, best of 3: 15.5 ms per loop
 }}}

 After:

 {{{
 sage: E = EllipticCurve('37a')
 sage: v = E.anlist(10000, python_ints=True)
 sage: %timeit [ZZ(a) for a in v]
 25 loops, best of 3: 12.8 ms per loop
 }}}

 It'll be faster elsewhere, but it's mostly a tiny improvement all over the
 place. Startup time may also be slightly improved (despite initializing
 the pool). The most important is to review the code for correctness (and
 of course verify the tests pass).

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13981#comment:4>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to