[Maxima] CL arrays
robert.dodier at gmail.com
Thu Jan 18 23:59:19 CST 2007
On 1/18/07, Raymond Toy <raymond.toy at ericsson.com> wrote:
> Robert> I think I'd prefer to make Lisp arrays invisible from the user's point
> Robert> of view. I'd like to rework lists and matrices to use arrays for
> Robert> storage, but without exposing the underlying array.
> I can understand having matrices stored in arrays instead of lists of
> lists, but why would you want lists to use arrays for storage?
Well, time to access an element is constant (I hope) but time
to access a list element depends on the position of the element --
it takes longer to get to the elements at the end of the list.
The time to get the n-th element might be logarithmic or linear
or something else, but for various Lisp implementations that I've
looked at, it's not constant. I'm not sure at this point if constant-
time access for lists is worth the trouble, but I also don't want to
rule it out.
More information about the Maxima