On Wed, Aug 7, 2013 at 1:38 PM, Gilbert Gede <gilbertg...@gmail.com> wrote: > Yeah, in the PR Aaron pointed out there is some code profiling I pastebin'd > in the comments. > I haven't gotten around to implementing the expand functionality yet - I > still had some questions for you Aaron. When you sugessted we promote > _expand_hint() to a user-level function, what did you mean by that (other > than removing the leading _)? Would there be any other changes to that > method? > > Also, is there any problem with putting @cacheit before many of the > Derviative methods, including __new__()? I did so, and it made the > linearization code run in 40% of the original time, and the tests seem to > still pass... Is there a reason cacheing isn't used more frequently?
The problem with caching is that we would need to implement something like LRU cache, but our caching, as far as I know, is only a dictionary, which will keep growing. Historically, we had other problems with caching, like if it caches the assumptions wrong, then some tests run when you run them individually, but fail when you run them as part of the whole test suite. Etc. --- there is lots of problems with caching. That being said, caching is of course some times very useful, as you pointed out. So we should make it possible to use caching when you need it. But I'd be a bit careful before decorating the whole sympy with @cacheit. Ondrej -- 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.