#16296: Speed improvements for categories with axioms
-------------------------------------+-------------------------------------
       Reporter:  SimonKing          |        Owner:
           Type:  enhancement        |       Status:  new
       Priority:  major              |    Milestone:  sage-6.3
      Component:  categories         |   Resolution:
       Keywords:  cython             |    Merged in:
  performance categories             |    Reviewers:
        Authors:                     |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  d42dc9c37015b51fac7a089654044dd132c75000
  u/SimonKing/ticket/16296           |     Stopgaps:
   Dependencies:  #10963, #15801     |
-------------------------------------+-------------------------------------

Comment (by SimonKing):

 Some functions in `c3_controlled` can not be cdef'd, because they contain
 "any(...)" clauses. For example:
 {{{
         for i in range(max_i): #from 0 <= i < max_i:
             O = heads[i]
             # Does O appear in none of the tails?
             O_key = key(O)
             if any(O_key in tailsets[j] for j in range(nbheads) if j !=
 i):
                 continue
 }}}
 It might be worth-while to see if the "any(...)" clause can be improved by
 something that is faster and does not use a clause. To the very least, I
 guess giving Cython some hints on the type (`tailsets[j]` is a set!) might
 pay off.

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