#12808: Optimize ClassCallMetaClass using Cython
--------------------------------------------------+-------------------------
       Reporter:  hivert                          |         Owner:  jason       
           Type:  enhancement                     |        Status:  needs_review
       Priority:  major                           |     Milestone:  sage-5.0    
      Component:  misc                            |    Resolution:              
       Keywords:  classcall UniqueRepresentation  |   Work issues:              
Report Upstream:  N/A                             |     Reviewers:              
        Authors:  Florent Hivert                  |     Merged in:              
   Dependencies:                                  |      Stopgaps:              
--------------------------------------------------+-------------------------

Comment (by hivert):

 Hi Simon,

 > Also, when `nested_pickle` calls `modify_for_nested_pickle`, it always
 looks up `sys.modules[...]` - thus, why not store `sys.modules` in a `cdef
 dict` variable?!

 Does this give a large speed-up ? I would guess that the dict search is
 the
 bottleneck, but without serious profiling one cannot be sure.

 > I only touched the nested classes, not `ClasscallMetaclass`, and the
 test suite isn't completed yet, but most seems to pass.
 >
 > What next? As I have pointed out, it seems more straight forward to cdef
 both `NestedClassMetaclass` and its subclass `ClasscallMetaclass`
 directly, not via an additional `ClasscallType`. How should it be
 organised?

 Sure ! ClasscallType was for me a step before doing more in depth change
 in
 the Metaclass infrastructure. I was quite scared to do those in depth
 change
 in Sage/Python and feared a lot of hard to debug segfaults. So I did the
 check
 by very small steps changing the less possible Sage files. Fortunately, it
 went quite smooth. I planned to keep the rest of the metaclass
 infrastructure
 for another patch but if you think you cdefing NestedClassMetaclass is
 easily
 done, we can do both at once an thus the need of ClasscallType vanishes.

 > Variant 1: I produce a patch that does the changes in nested_class, and
 includes most of the changes from your patch (but not `ClasscallType`).
 Then I post it here, and we cross-review.
 >
 > Variant 2: I review your patch from here, and do my changes (which would
 revert your changes in the bases of `ClasscallMetaclass`) on a different
 ticket.
 >
 > What do you prefer?

 As you wish ! I most probably wont be working on that ticket anymore,
 unless
 for addressing some reviewer remark or to help you if you need. The two
 variants are equal to me and you can consider yourself the owner of that
 ticker if you wish. We just need to have some clean review. So if you go
 for
 variant 2, I think you first need to positive review my change, and then
 revamp them and I will review you additions.

 So please shoot as you prefer ;-)

 Florent

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