in reply to Re: Linked-list Style Data Structure
in thread Linked-list Style Data Structure

Thanks, Abigail-II, for pointing out the vagueness in my question. The specific functionality that I am looking for at this point is essentially as you stated:

Although I currently do not need to insert or delete elements, I might need to in the future. However, since my lists will never be that long, and I would not do it that often, I could probably still use your suggestion (and rebuild the entire index when necessary) without any noticable performance issues.

In any case, it seems that you are advocating trying to use a data structure appropriate to the task, rather than relying on a generic structure that might be less suited. Am I understanding correctly?


Impossible Robot
  • Comment on Re: Re: Linked-list Style Data Structure

Replies are listed 'Best First'.
Re: Linked-list Style Data Structure
by Abigail-II (Bishop) on Oct 07, 2002 at 14:12 UTC
    In any case, it seems that you are advocating trying to use a data structure appropriate to the task, rather than relying on a generic structure that might be less suited. Am I understanding correctly?
    Yes, that's the Perl (and Unix) way. You have a large toolkit at your disposal, with lots of different tools. Different tools for different jobs. Use your toolkit. The saying "if all you have is a hammer, everything looks like a nail" is not at all appropriate for Perl.

    Abigail