According to the OP, I'd say his evaluation implies the opposite wrt. performance and costs. In my opinion, the evaluation failed, as it obviously has to be the other way around for average usage of instances. LinkedHashMap, in addition to a map, contains information about the order of elements. That is, more information (=more memory) and more effort to keep this information (=lower performance).
> According to the OP, I'd say his evaluation implies
> the opposite wrt. performance and costs.
Yes, that's what I thought too. I guessed it to be one of the sloppy micro-benchmarks you often see posted here.
> In my opinion, the evaluation failed, as it obviously has
> to be the other way around for average usage of
> instances.
That's why I ignored it and gave the answer I gave.
Hi.
Please clarify what you mean by "LinkedHashMap offers better performance".
LinkedHashMap is just a standard hashmap, backed by a linked list. It's useful if you want to guarantee the order of the items in the map.
I imagine the "performance" of the two would be quite similar, but unless you need the ordering guarantes of LinkedHashMap you should probably use HashMap.