|The stupid question is the question not asked|
Array VS Linked Listby asset (Novice)
|on Nov 16, 2007 at 17:15 UTC||Need Help??|
asset has asked for the
wisdom of the Perl Monks concerning the following question:
Hey folks. After reading previous posts on the topic of using linked lists in Perl, Ive come to the conclusion that the general concensus is that in Perl you will almost never need to use a linked list as push,pop,splice,etc on arrays provides the same functionality.
In my scenario Im putting together a non-blocking shell on Win32 and I want the lowest possible CPU usage I can get. I have the shell functional using an Array as the input storage mechanism, yet I'm questioning the potential resource savings I would get (in Perl) by using a linked list instead. The main reason Im questioning this is that the same code to handle the input string will also be used to perform simple editing of text documents within the same program.
So lets say I need to use as little CPU as possible, and I need to manipulate a block of text from anywhere within that block of text.
Now for my question.
Would you use a linked list instead, and would there be any modules out there that you would use instead of brewing it up from scratch?