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...
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? 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 sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. For more options, visit https://groups.google.com/groups/opt_out.