130 MB w/ no caching added, 150 MB w/ Derivative.new() cached, 160 MB w/
Derivative.new() and Basic.free_symbols() cached.

I'm going to work on this semi-localized cache thing right now.


On Wed, Aug 7, 2013 at 6:44 PM, Aaron Meurer <[email protected]> wrote:

> On Wed, Aug 7, 2013 at 6:04 PM, Gilbert Gede <[email protected]>
> wrote:
> > So, just applying @cacheit to Derivative.new() provides the 60%
> reduction in
> > time for the bike test, and all SymPy tests pass. I also tried cacheing
> > Basic.free_symbols. That (combined with the Derivative.new() cache) gave
> a
> > 87% reduction in time for the bike test (~150s -> ~20s). Unfortunately, a
> > lot of tests failed or raised exceptions...
>
> But what about memory use?
>
> >
> > Anyways, I think we'd want to check if the cache was on at the beginning
> of
> > one of these higher-level functions, and only clear it if the
> higher-level
> > function itself turned on caching, right? To avoid other methods
> prematurely
> > clearing the cache?
>
> Yeah, I guess the context manager should increment and decrement a
> count.  Or each context manager has its own cache as I suggested and
> if you are in multiple contexts, then multiple caches are updated.
>
> This is all actually pretty easy to implement if someone wants to give it
> a go.
>
> Aaron Meurer
>
> > I actually think having independent caches could be nice, because in
> > mechanics I doubt we'd get into problems w/ assumptions, but using one
> cache
> > throughout the duration of a problem might speed things up (I'm not sure
> by
> > how much though).
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "sympy" 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/sympy.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" 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/sympy.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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/sympy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to