#11794: Optional cythonised cached hash for Python classes
----------------------------------+-----------------------------------------
       Reporter:  SimonKing       |         Owner:  jason       
           Type:  enhancement     |        Status:  needs_review
       Priority:  major           |     Milestone:  sage-5.0    
      Component:  misc            |    Resolution:              
       Keywords:                  |   Work issues:              
Report Upstream:  N/A             |     Reviewers:              
        Authors:  Simon King      |     Merged in:              
   Dependencies:  #11115, #11791  |      Stopgaps:              
----------------------------------+-----------------------------------------

Comment (by SimonKing):

 Hi Florent!

 Replying to [comment:8 hivert]:
 > I've a question: how does it interact with #8119 ? Does it solve the
 problem there ?

 One could argue that my patch does not change any existing implementation
 of hash in Sage -- it is a new option to get a fast hash in a comfortable
 way, but that new option would (at least in the beginning) not be applied.

 Of course one could also argue that my patch could provide a tool to solve
 #8119. But I think the situation is not so easy. With my patch, the hash
 would be cached, so that renaming an object would not change the hash.
 However, consider the following two scenarios

 A)
  1. Create P
  2. hash(P)
  3. P.rename("bla")
  4. hash(P)

 versus

 B)
  1. Create P
  2. P.rename("bla")
  3. hash(P)

 With my patch, you would get the same result in A)2. and A)4 - which
 solves #8119 in scenario A). However, you would get a different result in
 A).2 and B).3.

 Hence, #8119 is no duplicate, but weakly related.

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