Java call performance vs search performance : <p>Currently my program is filled with many ugly references that often make field or method access look like this: <code>weakReference1.get().weakReference2.get().field1.getSomeCustomObject().field2</code>. I want to move to shorter and faster strong references like <code>field1.field2</code>. But my program design is such that I will also have to go for an <code>ArrayList</code> element-by-element search (in a for-loop) instead of accessing a <code>WeakHashMap</code> by <code>get()</code> method.</p>

<p>Thus, I'd like to understand, can moving to simpler references compensate for rejecting <code>HashMap</code> performance wise. Herewith I presume that <code>WeakHashMap.get()</code> is much faster than a loop-search of <code>ArrayList</code>.
Can someone, please, give me a rough estimate? Or maybe there's even an appropriate comparison table like <a href="http://www.asjava.com/core-java/time-consuming-operations-statistics-in-java/" rel="nofollow noreferrer">this one</a>. I'd appreciate that. </p>

<p>Thank you.</p>
