This discussion is archived
6 Replies Latest reply: Apr 14, 2010 9:58 AM by 796440 RSS

Is iteration over a HashMap significantly slower than an ArrayList?

807580 Newbie
Currently Being Moderated
Will this piece of code be significantly slower than iteration over an ArrayList?

for(Object o : myMap.values()){
...
}

I'm expecting the map to contain roughly between 10 and 50 elements.

thanks,