Thanks Minh and Simon! On Mon, Jul 27, 2009 at 8:13 AM, Simon King<simon.k...@uni-jena.de> wrote: >> --------- >> sage: f(x) = function('f',x); >> sage: timeit('bool( f(x) == 0 )') >> 5 loops, best of 3: 71.6 ms per loop >> sage: timeit('bool( f(x) == 0 )') >> 5 loops, best of 3: 89.1 ms per loop > > Finally someone comes up with a very short example of this > phenomenon! > > The code that I posted there was far too complicated, I guess. But > later, I posted trac ticket #4731 with a much simpler code, see > http://trac.sagemath.org/sage_trac/ticket/4731 > > Appararently nobody was ever working on it.
Yeah. Thats what it seems :-) I did bit more digging trying to pin-point the culprit. In a fresh sage prompt if I try the following: ------ sage: timeit('integrate(sin(x)/x, x)') 5 loops, best of 3: 524 ms per loop ------ where as if I try above directly in the maxima (./sage -sh && cd local/bin && ./maxima ) ------- (%i2) integrate( sin(x)/x, x); Evaluation took 0.0120 seconds (0.0100 elapsed) ... (%i3) integrate( sin(x)/x, x); Evaluation took 0.0080 seconds (0.0090 elapsed) ... ------- Assuming time reported in both systems can be compared, I made two observations: (1) Repeated use of same command within maxima (directly) shows no degradation of evaluation time where as doing the same within Sage clearly shows progressive degradation. (2) In a fresh prompt: for the same computation, maxima took 120 ms where as the Sage reports 524ms!! Am I doing something terribly wrong? Or is it just because of pexpect overhead? Cheers, Golam --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---