java.util.ThrashMap
Listen to this article
I received a very interesting post from the JESS mailing list last night and thought it was worth a mention.
There's a weird threshold that can occur with any Java data structure that uses large arrays of Object references (Object[]). If the size of the Object array exceeds the maximum size of objects that can be placed in the "new generation", garbage collection performance can be severely impacted...
I'm not sure if I'm likely to see this problem really but I do ue HashMaps a fair bit so I thought it was interesting. In general I don't find the need to use arrays much if at all these days. In fact, for some inexplicable reason, I tend to use LinkedList over ArrayList and, except for Simian which uses lovingly hand-crufted data structures, I can't recall ever holding maps of data large enough to exhibit this behaviour. But then again I'm not implementing a Rules Engine.
Comments
> In fact, for some inexplicable reason, I tend to use LinkedList over ArrayList
could it be that you add, remove and iterate more often than you index?
Posted by: Anonymous | September 29, 2004 11:21 AM
Most probably. Who knows but the aversion is there. Come to think of it, I don't really use Lists all that much either, tending to use Maps and Sets much more often.
Posted by: Simon Harris | September 29, 2004 07:15 PM