#11900: Serious regression caused by #9138
-------------------------------------------------------------+--------------
   Reporter:  SimonKing                                      |          Owner:  
tbd                  
       Type:  defect                                         |         Status:  
needs_work           
   Priority:  critical                                       |      Milestone:  
sage-5.0             
  Component:  performance                                    |       Keywords:  
categories regression
Work_issues:  Update reviewer patch                          |       Upstream:  
N/A                  
   Reviewer:  Jeroen Demeyer, Nicolas M. ThiƩry, Simon King  |         Author:  
Simon King           
     Merged:                                                 |   Dependencies:  
#9138 #11911 #9562   
-------------------------------------------------------------+--------------
Changes (by SimonKing):

  * status:  needs_review => needs_work


Comment:

 I am now trying a different approach: I introduce a cdef class
 `FastHashable_class`. It has a cdef int attribute _hash, and `__hash__`
 simply returns `self._hash`. I make `Category_singleton` inherit from this
 class and from `Category`. In the `__classcall__` method, I assign the
 value of `_hash` appropriately.

 First tests show that the hash method will be even faster than with the
 current patch, and since it uses a straight forward `__hash__` method (not
 a lazy class attribute) it is likely to work in Python 2.7.

 Preparing a patch now...

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