> Looks useful, but I don't think it's linear, more like O(n^2). After
> all, accessing the /n/th element of a Maxima list is O(n).
>
> For example, on my machine, SignaturePermutation(makelist(i,i,1,1000))
> takes 0.23 sec, while SignaturePermutation(makelist(i,i,1,10000)); takes
> 19.8 sec. (uncompiled) Compiled numbers are 0.05 / 6.42.
Thanks, RJF also pointed that out. He suggested copying
the input to an array; but that incurs overhead which may
not be worth it for short lists. I suppose how much effort
to put into it depends on how much and what it is used
for.
-- John Lapeyre