I feel that incorporating the assumptions into the hash key is unnecessary and bogs things down. I haven't had the time to fully pick through that branch, but running the tests doubles the time from ~330sec to ~760sec. If you simply flush in between calculations, it only adds ~20sec to the mix: - https://github.com/haz/sympy/commit/fb750ea49b963fa12d3a3e2dc833e53931050160
<https://github.com/haz/sympy/commit/fb750ea49b963fa12d3a3e2dc833e53931050160> That commit (from what I can recall of last year's debugging sessions) would be enough to fix 99.9% of the problems with the cache -vs- assumptions. The other 0.1% involves treating the (new) assumptions used in the core with the utmost care -- I'm of the opinion that they should be used (i.e., new assumptions created) very little (possibly not at all) in the core of SymPy. The disabling of the cache was definitely a bog from last year, but I was able to bring the speeds back up to acceptable limits by using the cache and aggressively clearing it. Same had to be done with the global assumption context since there was a conflict of scoping. Anyways, for the caching at least, I think that the above commit is enough to solve the problems with assumptions-and-caching. From there, we can move on to scoping (I feel that a new thread (with accompanying wiki writeup) is in order). Cheers, Christian On Mon, May 2, 2011 at 3:30 AM, Tom Bachmann <[email protected]> wrote: > Alright, so I took Vinzent's old branch and made the most important > things work over current master - see my local_assump branch [*]. I > also added the hashing extensions for caching I described. Now only > someone has to be daring enough to rewrite all the .is_foo properties > and see how much breaks. > > [*] There are a few test failures, but nothing unfixable. > > @Haz: Can you take a look if this implementation of caching is still > amenable to the problems you described? There is a test in > test_cache.py that you could take as a baseline. > > Even if we decide that assumptions should all be passed around > explicitely, I think assumption injection is a good transition > strategy. > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/sympy?hl=en. > > -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
