Le 22/04/2013 10:27, Tom Bachmann a écrit :
I attach the output. Here is my reading:
- simplify spends 70% in together and powsimp
- together spends 99% in object creation
- powsimp spends 95% in object creation
- AssocOp.__new__ spends 90% in flatten
- flatten has now obvious hotspot
What I can see is that flatten spends considerable amounts of time in
things which recursively call flatten *again* (i.e. things like a *= b).
This seems to indicate that it can probably benefit from memoization
caching.
Memoization won't achieve anything, Mul is already cached. We need to
find a way to avoid O(n) operations (like <Mul> *= b) in the first
place. Also, Mul.flatten does way too many things and has way too many
special cases. Rational powers simplification shouldn't be done there
and things like I * zoo shouldn't have to go through Mul.flatten.
--
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?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.