#13589: Controlling C3 to solve once for all the Method Resolution Order issues
for
category classes
----------------------------------------------------------+-----------------
Reporter: nthiery | Owner:
nthiery
Type: defect | Status:
needs_review
Priority: major | Milestone:
sage-5.11
Component: categories | Resolution:
Keywords: method resolution order, C3 | Work issues:
Report Upstream: N/A | Reviewers:
Simon King, Florent Hivert
Authors: Nicolas M. ThiƩry | Merged in:
Dependencies: #12894, #12876, #11935, #12895, #10193 | Stopgaps:
----------------------------------------------------------+-----------------
Comment (by SimonKing):
Replying to [comment:54 nthiery]:
> Thanks for the timings! The startup gain should be of roughly
50*(231-74)ns which will be anyway far less than a ms and negligible. I
would thus tend to stick to the standard Python module itertools, and
ignore the little indicator from the startup module plugin.
Too late... I already posted an update of my patch.
Well, I'd say let the patchbot try, at least.
> As for the time increase: I will post a poll on sage-devel later today.
Thank you.
I've put the cpdef counter into sage.misc.c3_controlled---I think this is
a good place, given that it is needed when applying the controlled c3 in
categories.
With the original patch, one had `Category._cmp_key_generator.next()`,
hence, two attribute lookups and a function call. With the new patch, one
just has one function call, which also seems to be faster than the
function call to `next()`.
Let us keep our fingers crossed concerning the findings of the patchbot...
Apply trac_13589-categories-c3_under_control-nt.patch
trac13589_cmp_key_attribute.patch trac13589_improve_startuptime.patch
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13589#comment:55>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.