marcusaram / snakeyaml

Automatically exported from code.google.com/p/snakeyaml
Apache License 2.0
1 stars 0 forks source link

LinkedList is inefficient for iteration #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
ArrayList is more efficient than LinkedList if you just want to create a
collection and iterate through it.

http://soft.killingar.net/documents/LinkedList+vs+ArrayList

In summary, LinkedList should *only* be used when you need to do lots of
inserts and deletions in the *middle* of the list.

Original issue reported on code.google.com by infinity0x@gmail.com on 21 Aug 2009 at 12:04

GoogleCodeExporter commented 9 years ago

Original comment by py4fun@gmail.com on 21 Aug 2009 at 3:54

GoogleCodeExporter commented 9 years ago

Original comment by py4fun@gmail.com on 27 Aug 2009 at 5:08

GoogleCodeExporter commented 9 years ago
ArrayStack is introduced to use push() and pop() instead of standard (and too 
verbose) 
'stack.remove(stack.size()-1)'. 

Original comment by py4fun@gmail.com on 31 Aug 2009 at 10:21