Hi Enrique,

> If we have a linear list for which we need fast access, we can do
> another thing:  Instead of substituting the list with an array
> structure, we can keep the list and use an array as a helper of the
> original list.

Do you think this is a good idea?

OK, you have a list then, where you can access the elements by index.

But if you have such a redundant structure, where the array elements
point into the list, you have a large overhead to build both the array
and the list. You can't do any changes (cons, insert, delete, reverse)
without rebuilding the array. And - as before - you have to keep track
of your arrays to know when to dispose them.

I'm still not convinced at all that accessing list elements by a numeric
index is really needed, or at least justifies the effort. The mentioned
'hash' mechanism is alread there, in constructs like the built-in
'cache' function (see also the answer by Denis Fourt).

♪♫ Alex
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to