#10834: faster creation of an ETuple from a list or tuple
-----------------------------+----------------------------------------------
   Reporter:  pernici        |       Owner:  AlexGhitza
       Type:  enhancement    |      Status:  new       
   Priority:  major          |   Milestone:  sage-4.6.2
  Component:  algebra        |    Keywords:            
     Author:  mario pernici  |    Upstream:  N/A       
   Reviewer:                 |      Merged:            
Work_issues:                 |  
-----------------------------+----------------------------------------------

Comment(by pernici):

 With trac_10834_etuple.patch
 the creation of an ETuple from a list or tuple is faster

 main is Sage-4.6 unpatched; run with processor Intel Core i7 2.80GHz
 {{{
 main
 sage: from sage.rings.polynomial.polydict import ETuple
 sage: a = [map(int,[i,1,-5, 3, 1,0]) for i in range(100)]
 sage: %timeit map(ETuple,a)
 625 loops, best of 3: 130 µs per loop

 patch
 625 loops, best of 3: 21.5 µs per loop
 }}}


 The `multi_polynomial_libsingular exponent` method becomes faster;
 here is a benchmark taken from ticket #7587

 {{{
 main
 sage: R = PolynomialRing(QQ,100,'x')
 sage: p = R.random_element(degree=50,terms=50)
 sage: timeit('p.exponents()')
 625 loops, best of 3: 595 µs per loop
 sage: timeit('p.exponents(as_ETuples=False)')
 625 loops, best of 3: 78.3 µs per loop

 patch
 sage: R = PolynomialRing(QQ,100,'x')
 sage: p = R.random_element(degree=50,terms=50)
 sage: timeit('p.exponents()')
 625 loops, best of 3: 119 µs per loop
 sage: timeit('p.exponents(as_ETuples=False)')
 625 loops, best of 3: 70.9 µs per loop
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10834#comment:1>
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