#10834: faster creation of an ETuple from a list or tuple
---------------------------------+------------------------------------------
       Reporter:  pernici        |         Owner:  AlexGhitza      
           Type:  enhancement    |        Status:  positive_review 
       Priority:  major          |     Milestone:  sage-5.7        
      Component:  algebra        |    Resolution:                  
       Keywords:  days45         |   Work issues:                  
Report Upstream:  N/A            |     Reviewers:  Travis Scrimshaw
        Authors:  mario pernici  |     Merged in:                  
   Dependencies:                 |      Stopgaps:                  
---------------------------------+------------------------------------------
Changes (by tscrim):

  * keywords:  => days45
  * status:  needs_review => positive_review


Comment:

 Looks good to me.

 Before patch (running `5.7.beta3`):
 {{{
 sage: %timeit ETuple([5,2,2,1])
 100000 loops, best of 3: 6.4 us per loop
 sage: %timeit ETuple([5,2,2,1]*20)
 10000 loops, best of 3: 54.8 us per loop
 sage: L = [5,2,2,1]*10000
 sage: %timeit ETuple(L)
 10 loops, best of 3: 26 ms per loop
 sage: %timeit ETuple(L)
 10 loops, best of 3: 24.2 ms per loop
 }}}

 After patch:
 {{{
 sage: %timeit ETuple([5,2,2,1])
 100000 loops, best of 3: 3.1 us per loop
 sage: %timeit ETuple([5,2,2,1]*20)
 10000 loops, best of 3: 26.9 us per loop
 sage: L = [5,2,2,1]*10000
 sage: %timeit ETuple(L)
 100 loops, best of 3: 5.97 ms per loop
 sage: %timeit ETuple(L)
 100 loops, best of 3: 6.23 ms per loop
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10834#comment:3>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to