#14529: Drastic performance improvement of computing the chromatic polynomial
--------------------------------+-------------------------------------------
Reporter: azi | Owner: jason, ncohen, rlm
Type: enhancement | Status: new
Priority: major | Milestone: sage-5.10
Component: graph theory | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
--------------------------------+-------------------------------------------
Comment (by ncohen):
Helloooooooo !
> How do you think we should handle the global cache if this is to be made
into a proper patch?
Hmmm... Well, there is the @cached_method decorator, that automatically
manages the cache of any function. But you can't empty it automatically
when the computations are done though.
Technically, what you can do is write a function A (without the decorator)
which call function B (the real one, with the cached_method decorator).
Before returning B's result, A would clear the cache of B.
I wouldn't go to such lengths before there is a real need, actually... If
somebody computes one chromatic polynomial perhaps he will compute two,
and ... well. It's up to you. To me caching the method with the
cached_method decorator would do the job. and you can add in its
documentation an explanation of how the cache can be cleared manually,
with the `clear_cache` method.
http://www.sagemath.org/doc/reference/misc/sage/misc/cachefunc.html
> Also whom would you send an email to?
The file seems to have been written by Robert Miller and Gordon Royle
(just reading the copyright in the file itself). Robert Miller does not
work on Sage anymore but should be interested (he's the one who initially
wrote all the graph-related stuff in Sage. Backends included). And Gordon
Royle may be interested too, though I probably never wrote to him `:-)`
Nathann
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14529#comment:7>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.