[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: iptables -A or iptables -I?



In article <[🔎] 20041019171304.GA8179@cirrus.madduck.net> madduck@debian.org writes:
>Inserting is almost never quicker than appending. In fact, I am
>having trouble coming up with a data structure where insertions are
>as quick as appendages, provided, of course, that the difference
>makes sense. After all, appendage is nothing but an insertion at
>n+1.

He asked about inserting at the beginning vs appending.  If I was
designing this data structure, I'd most likely use a single linked
list where inserting at the beginning would be faster for long lists.
(The latter needs to traverse the list.)

I'd recomend that anyone who cares either read the source or test.

-- 
Blars Blarson			blarson@blars.org
				http://www.blars.org/blars.html
With Microsoft, failure is not an option.  It is a standard feature.



Reply to: