I've always been told that linked lists are faster (in algorithms course in college). I never really understood why people say that when arrays give indexed access to its elements.I mean its cool that linked lists gives dynamic memory allocation and all but the trade-off is too high. As davido points out, everything will require O(n) time but arrays can do some stuff in O(1) time (fetch an element at an index).
Trees and other DSs maybe useful (Perl provides so many already) but linked lists are just a learning exercise for a coding craved mind.
in reply to Re: Data structures in Perl. A C programmer's perspective.
in thread Data structures in Perl. A C programmer's perspective.
PS: RAM is not a random-access memory device! I'll need something in written to digest that! :P