On 2016-03-17, Dima Pasechnik <[email protected]> wrote:
> I notice that matroid code does not make any use of @cached decorator.
> Perhaps it could simplify parts of code it it was used.

Note that it isn't just "@cached", but "@cached_method". See
sage.misc.cachefunc for some variations of the theme (e.g., there is a
decorator for cached functions, for cached methods, for a cache that is
stored in the parent rather than in the element, for using a weak key
dictionary, ...

And it is rather fast. I don't know if your code is Python or Cython.
But if you use a self-made cache in Python, then I wouldn't be surprised
if @cached_method were faster.

Best regards,
Simon

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"sage-matroid" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to