I was wondering what the performance impact would be when using ArrayList.ListIterator(int index – 1), then it.next() in contrast to using ArrayList.get(int index)?
I was wondering what the performance impact would be when using ArrayList.ListIterator(int index –
Share
Why look at the implementations…
1: List.listIterator(int)
with
and
2: List.get(int)
Should be quite obvious, which one is faster. For details about performance impacts, I will have to agree with Mike. Profile it. Whatever the reason is, you’d like to use such a distinct access method just to access one item (?)