#11115: Rewrite cached_method in Cython
------------------------------+---------------------------------------------
Reporter: SimonKing | Owner: jason
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.7
Component: misc | Keywords: category cython cache
Author: Simon King | Upstream: N/A
Reviewer: | Merged:
Work_issues: Wait for #9138 |
------------------------------+---------------------------------------------
Comment(by nthiery):
Replying to [comment:13 SimonKing]:
> Obviously, if a method takes no arguments, then caching the single value
is much easier than storing the results in a dictionary for different
arguments. I implemented this special case in a class
`CachedMethodCallerNoArgs`. It is automatically used if `@cached_method`
is a applied to a method without arguments. In particular, one does not
need to do changes in the code.
Yeah! I have been dreaming of this performance improvement since 2008!
Altogether, my only reluctance on this patch is about the addition of
an attribute to all Sage elements. This sounds like a non trivial
increase of the memory footprint for small objects like finite field
elements. I don't have an opinion about this myself, but this
definitely requires a discussion on sage-devel.
Parents are big objects, so this is not an issue for those.
Simon: you are doing way too much good stuff for me to follow!
Honestly, I feel a bit lost about where to start. Do you mind making a
prioritized list of patches that need review, say on the category
roadmap [1]?
Thanks!
Cheers,
Nicolas
[1] http://trac.sagemath.org/sage_trac/wiki/CategoriesRoadMap
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11115#comment:16>
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.