#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, Simon King      |     Merged in:              
   Dependencies:                                  |      Stopgaps:              
--------------------------------------------------+-------------------------

Comment (by hivert):

 Hi Simon,

 Thanks a lot for this in depth timing measurement !

 > My first patch does improve the time spent for the creation of a nested
 > class.

 Excellent !

 > Your patch improves a lot of things for classcall metaclass. My second
 patch
 > makes (I think) the inheritance a bit clearer, but it does not provide a
 > speed-up. The reason is explained in my previous post.

 I fully agree that it is clearer. There may be however some speed penalty
 with
 getting rid of {{{ClasscallType}}} if we need at some point to construct a
 lot
 of classes which need the classcall trick but without nested classes. I
 don't
 know if this usecase is realistic at all. Do you have any idea on this
 question ? I don't even know if the current dynamic class allows it.
 Anyway,
 there won't be any overhead from the point of view of the instances
 creation
 and, manipulation but there may be when creating the '''classes'''
 themselves. Therefore I think we should measure the relative price of
 creating
 '''classes''' which {{{ClasscallType}}} vs {{{ClasscallMetaclass}}}. I'll
 investigate this while reviewing your patch.

 So my current opinion is: we should do the timing while we can easily do
 it. Then if nothing is measurable with the current Sage usage, but
 measurable
 with some weird one, we should remove {{{ClasscallType}}} (any unused code
 and
 moreover confusing code shouldn't remain) keeping somewhere a note saying
 that
 if the weird usecase appear (which I don't really believe) we should
 separate
 {{{ClasscallType}}} vs {{{ClasscallMetaclass}}}.

 Cheers,

 Florent

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