http://www.perlmonks.org?node_id=1052795


in reply to Re: Data structures in Perl. A C programmer's perspective. (vector vs linked list performance)
in thread Data structures in Perl. A C programmer's perspective.

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.

PS: RAM is not a random-access memory device! I'll need something in written to digest that! :P