> -----Original Message-----
> From: maxima-bounces at math.utexas.edu
> [mailto:maxima-bounces at math.utexas.edu] On Behalf Of Raymond
> Toy (RT/EUS)
> Sent: Wednesday, March 26, 2008 9:19 AM
> To: fateman at EECS.Berkeley.EDU
> Cc: 'Maxima List'; 'Robert Dodier'
> Subject: Re: [Maxima] Ordering of vector variables?
>
> Richard Fateman wrote:
> > Re-examining 'great' and friends should be done with
> extreme caution.
>
> If nothing else is done, we should at least do this: Add a
> big comment
> on great that extreme care needs to be exercised when modifying it.
I looked at it a little (not for the first time). ordering
a[1,2,3], b[3,4,5] is done by ordering the arguments and then the heads.
Yes, a comment is appropriate.
>
>
> > I believe that the simplifier spends the vast majority of
> its time in
> > 'great' etc. Code to make this stuff exponentially faster, at least
> > with lisps that have good hash coding, has been
> demonstrated (by me).
>
> This sounds quite interesting. Did you have specific examples that
> became much faster with this change? Do simple cases become slower?
Simple cases like + or * with fewer than 4 items become slower, using
allegro common lisp. the tradeoff for GCL is probably different because
of slower hashing. (Barton did tests of this)
For large examples, e.g.
k: makelist(a(i),i,0,100000)$
apply("+",k)$
If I understand my own paper of a few years ago, the time to do this on a
particular computer with the modified great/simp/ was 0.5 seconds.
The time with the original great/simp is estimated to be over 24 hours.
The paper is http://www.cs.berkeley.edu/~fateman/papers/newsimp.pdf
Note that the paper does more that just rewrite great/etc. It proposes that
sums and products be stored as hashtables.
RJF