[Maxima] Timing, profiling...

Robert Dodier robert.dodier at gmail.com
Sat Jul 22 19:47:26 CDT 2006


On 7/17/06, Barton Willis <willisb at unk.edu> wrote:

> To evaluate sum(a[i],i,1,n), Maxima calls
> great n^3 / 6 - n / 6 times (experimentally determined).
> Surely even a  simple-minded algorithm would be O(n^2).

I've committed a revision of src/asum.lisp such that the time
to evaluate sum(a[i], i, 1, n) scales like n^2 instead of n^3.
Before, the code (in DOSUM iirc) was constructing an
expression ((MPLUS) ...) and simplifying it. Now the code
calls ADD for each term instead.

HTH
Robert




More information about the Maxima mailing list