#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):

 Replying to [comment:23 SimonKing]:
 > [...]
 >
 > So, it is not for making something importable, but for ''excluding''
 something from automatic import? Cool!

 Yep ! see
 [http://docs.python.org/tutorial/modules.html#importing-from-a-package
 importing * from a package]

 > > > Why is there a two-step cythonisation?
 > >
 > > There is this discussion about cleaning up the way metaclass are
 defined and
 > > used in Sage.
 >
 > You mean the [http://groups.google.com/group/sage-combinat-
 devel/browse_thread/thread/ae09de5a608525e5 sage-combinat-devel] thread I
 started?

 Yes ! An some face to face discussion we had with Nicolas.

 > > I just wanted to keep features separate.
 >
 > Well, I actually think cythoning `NestedClassMetaclass` is ''less''
 intrusive than your patch.
 >
 > Compare: You have to ''add'' a new cdef class `ClasscallType` and change
 the inheritance of `ClasscallMetaclass`. I suggest to change
 `NestedClassMetaclass` into a cdef class, keep the inheritance of
 `ClasscallMetaclass`, and avoid the addition of `ClasscallType`.
 >
 > I think I will test it...

 Except that at some point Nicolas suggested to keep NestedClassMetaclass
 for
 Categories... The truth is that I've currently no idea on the good way
 metaclass should be organized in Sage. So I tried to avoid any interface
 changes. I was even surprised that the Cythonizing work so well without
 breaking anything in Sage. Now If you think there is a better/faster
 way. Please give it a try.

 > > I had the
 > > impression from C that this inline doesn't do anything if the function
 is
 > > defined in a different module. More precisely, in C/C++ inline only
 work if
 > > the function is defined in {{{.h}}} instead of {{{.c}}}. Does Cython
 do
 > > anything for that ?
 >
 > I expected it to be inlined, if it is defined cpdef inline in the pxd
 file, and then cimported into another cython file. But I don't know if
 that is really done, actually.

 I'll look at the compiled result.

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