Hi Akshay, On Apr 16, 11:51 am, Akshay Srinivasan <akshaysriniva...@gmail.com> wrote: > Forgot to expand the terms in the program, > ------------------------------------ > [neptune ~/bench] time g++ -lcln -lginac RAMspeed.cc -o RAMspeed > > real 0m57.911s > user 0m55.526s > sys 0m0.780s > [neptune ~/bench] time ./RAMspeed expr > > real 0m11.153s > user 0m10.786s > sys 0m0.253s > ---------------------------------- > > The program took about 70MB of RAM. > > On 04/16/10 21:09, Akshay Srinivasan wrote: > > > > > I don't think I can really help with why Sympy takes so much RAM; but > > I just ported your code to GiNaC - C++ - just to see how it fares in > > comparison. Here are the results: > > ---------------------------------------------------------------------------------- > > [neptune ~/bench] time g++ -lginac -lcln RAMspeed.cc -o RAMspeed > > > real 1m0.771s > > user 0m56.316s > > sys 0m0.770s > > [neptune ~/bench] time ./RAMspeed > > > real 0m0.049s > > user 0m0.033s > > sys 0m0.007s > > ------------------------------------------------------------------------------------------- > > It takes a lot of time to compile though :( > > > Maybe this is why Mathematica was so fast ? It probably uses some > > compiled backend to speed things up. Of course I could be wrong. > > > Akshay
Thanks for the comparison. I was thinking about trying GiNaC or SwiGiNaC, but hopefully Mateusz's suggestions will allow me to do everything in SymPy. Those three polynomials had to be built up with a recursive process that SymPy made really convenient, but it is good to know that GiNaC is a viable option. Ben -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sy...@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.