Comment #31 on issue 2607 by [email protected]: as_numer_denom() is too slow
http://code.google.com/p/sympy/issues/detail?id=2607
If a Horner representation is acceptable (like as_numer_denom3) then using
a binary approach to build the numer and denom is about 100X faster for the
all-different-denom case:
regular
(1/x+1/y+1/z+1/w).as_numer_denom()
(w*x*y + w*x*z + w*y*z + x*y*z, w*x*y*z)
horner
(1/x+1/y+1/z+1/w+1/u).binary()
(u*x*y*z + w*(u*z*(x + y) + x*y*(u + z)), u*w*x*y*z)
Expanding the numerator makes the total time 2X longer then the
as_numer_denom4 case, however. Timings at https://gist.github.com/1128492
This is available at my `and` branch.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" 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-issues?hl=en.