#6637: standardize the interface to TransitiveIdeal and friends
-------------------------------------+-------------------------------------
       Reporter:  nthiery            |        Owner:  mhansen
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.3
      Component:  combinatorics      |   Resolution:
       Keywords:  backtrack,         |    Merged in:
  enumerated set, transitive         |    Reviewers:
  closure, days57                    |  Work issues:
        Authors:                     |       Commit:
Report Upstream:  N/A                |  52ce4a357d72762caf3339fe0282a0364e15a842
         Branch:  u/slabbe/6637      |     Stopgaps:
   Dependencies:  #14052             |
-------------------------------------+-------------------------------------

Comment (by slabbe):

 Indeed, there is some gain. I did one example:

 Python:

 {{{
 sage: f = lambda a: [a-1,a+1]
 sage: C = RecursivelyEnumeratedSet([10, 15], f, structure='symmetric')
 sage: it = iter(C)
 sage: %time L = [next(it) for _ in xrange(10^6)]
 CPU times: user 5.82 s, sys: 239 ms, total: 6.06 s
 Wall time: 6.07 s
 }}}

 Cython:

 {{{
 sage: f = lambda a: [a-1,a+1]
 sage: C = RecursivelyEnumeratedSet([10, 15], f, structure='symmetric')
 sage: it = iter(C)
 sage: %time L = [next(it) for _ in xrange(10^6)]
 CPU times: user 4.47 s, sys: 408 ms, total: 4.88 s
 Wall time: 4.89 s
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/6637#comment:31>
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/d/optout.

Reply via email to