On Fri, 1 Jun 2001 05:58:51 +0900
"Wesley J Landaker" <wjl / mindless.com> wrote:

> Unless you are just trying to make a linked list for the academic fun 
> of it, there really isn't much reason to use one.
> 
> Instead, just use Ruby's built in Array. Remember, elements in a Ruby 
> array are just references to the real objects, the array itself doesn't 
> actually hold their data. Since the array is growable, searchable, 
> sortable, etc, you have all the benefits of a linked list. =)

If you were doing a lot of insertions and removals on large lists, a
linked list would probably be a fair bit faster, since I'm pretty sure the
Array implementation has to do a lot of copying in such cases.

But I would still recommend using an Array until you were sure that it was
a performance problem.