aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes LinkedXXX vs XXX iteration speed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "LinkedXXX vs XXX iteration speed" Watch "LinkedXXX vs XXX iteration speed" New topic
Author

LinkedXXX vs XXX iteration speed

Andre Enimot
Ranch Hand

Joined: Jul 29, 2009
Posts: 31
K&B 6 book ch 7:

p. 562: "...LinkedList may iterate more slowly then an ArrayList"
p. 564: "...you can expect faster iteration with a LinkedHashMap" (compared to HashMap)

So do LinkedXXX provide slower or faster iteration compared to XXX? I'd expect the trend be the same for Lists and Maps?
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9302
    
  17

I'd expect the trend be the same for Lists and Maps?

Why?? Lists and Maps are two completely different things. Iteration speed depends on the implementation of a collection. It doesn't has to do anything with names (LinkedXXX or XXX)...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: LinkedXXX vs XXX iteration speed