#12029: Fast conversion of ClonableIntArray to list
-----------------------------+----------------------------------------------
   Reporter:  SimonKing      |          Owner:  sage-combinat
       Type:  enhancement    |         Status:  needs_review 
   Priority:  major          |      Milestone:  sage-4.8     
  Component:  combinatorics  |       Keywords:               
Work_issues:                 |       Upstream:  N/A          
   Reviewer:                 |         Author:  Simon King   
     Merged:                 |   Dependencies:               
-----------------------------+----------------------------------------------

Comment(by hivert):

 Hi Simon,

 If correct with respect to memory management, I uploaded a patch which
 when
 applied over yours gains some more speed:

 This is before my patch:
 {{{
 sage: from sage.structure.list_clone import IncreasingIntArrays
 sage: I = IncreasingIntArrays()(range(1000))
 sage: timeit("L = I.list()", number=10000)
 10000 loops, best of 3: 18.1 µs per loop
 }}}

 This is after my patch:
 {{{
 sage: from sage.structure.list_clone import IncreasingIntArrays
 sage: I = IncreasingIntArrays()(range(1000))
 sage: timeit("L = I.list()", number=10000)
 10000 loops, best of 3: 14 µs per loop
 }}}

 So this is more 20 percents faster... After having a Cython expert check
 the
 reference counting stuff, this is probably worth including.

 What do you think ?

 Cheers,

 Florent

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