Re: linked lists

[email protected] (Nick Ing-Simmons)
Newsgroups perl.loop
Message-ID <E13UEDE-0007Ns-00@roam1>
Joshua N Pritikin <[email protected]> writes:
>Wow!  I am reading about the Linux linked list implementation.  In
>comparison to Linux, Event wastes an unnecessary pointer on every link. 
>I'd better fix this!  :-)

In case it is relevant - back in days of 64K memory we had a real-time OS
that kept a queue as a single linked circular list.

The variable kept a pointer to the _last_ element. You could then add to the 
end of the queue easily. Also as list was circular head of queue was only 
one indirection away.

In perl terms:
   push  - easy
   shift - easy
   unshift - easy 
   pop     - hard

-- 
Nick Ing-Simmons
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.