[Maxima] Maxima/Ecl on 32-bit machine cannot evaluate "apply(union, listify({{..}}))"
Stavros Macrakis
macrakis at alum.mit.edu
Wed Sep 3 15:46:07 CDT 2008
On Wed, Sep 3, 2008 at 3:43 PM, Oliver Kullmann <O.Kullmann at swansea.ac.uk>wrote:
> > > - makelist has a bug when the loop is empty
> (%i7) makelist(i,i,0,-2);
> If 4 arguments are given to MAKELIST, the difference of the 3rd and 4th
> arguments should evaluate to a non-negative integer:
> -2
> -- an error. To debug this try debugmode(true);
>
This is not a bug. This is the designed behavior. The error message is
actually not quite correct: makelist(i,i,1,0) gives the empty list (i.e.
difference is -1). We might want to change this behavior, but it is not a
bug.
We stopped using xreduce for big unions, since for some our applications it
> had
> a big effect --- 5 hours instead of 1 hour where you need to do a lot of
> experimentations
> is not good.
>
It sounds as though we should improve the performance of xreduce. In
particular, it ought to use apply internally up to the limit of the
underlying implementation, to take full advantage of the underlying
implementation while keeping the code portable. By the way, depending on
the patterns in your data, you may also wish to try lreduce, rreduce, and
tree_reduce; sometimes there are big differences in the performance of the
three.
l r tree
append 7.63 0.97 0.02 -- [a,b,c] -- apply will be even faster
union 3.28 3.12 0.18 -- {random(100)}
-s
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.math.utexas.edu/pipermail/maxima/attachments/20080903/c569fead/attachment.htm
More information about the Maxima
mailing list