• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

LinkedXXX vs XXX iteration speed

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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)...
 
reply
    Bookmark Topic Watch Topic
  • New Topic