Hi all.
I have a little doubt on a performance issue, and I was wondering if any of you had experience on this.
My doubt comes from a "Mortal Kombat" HashMap vs ArrayList doing a "contains" operation. To be more exact, ArrayList.contains vs HashMap.containsKey.
I've had a look at source code for both, but I've not managed to calculate O for HashMap. I've also searched the web, but no one seems to care about this, what makes me think that the difference will be really small.
Anyway, if any of you have any comments on this, they will be wellcome.
Cheers.
Dian
I have a little doubt on a performance issue, and I was wondering if any of you had experience on this.
My doubt comes from a "Mortal Kombat" HashMap vs ArrayList doing a "contains" operation. To be more exact, ArrayList.contains vs HashMap.containsKey.
I've had a look at source code for both, but I've not managed to calculate O for HashMap. I've also searched the web, but no one seems to care about this, what makes me think that the difference will be really small.
Anyway, if any of you have any comments on this, they will be wellcome.
Cheers.
Dian