[jdom-interest] efficient Java collections

Jason Baldridge jmb at cogsci.ed.ac.uk
Fri Mar 8 03:25:10 PST 2002

Hi all,

I'm passing this correspondence with Jason Hunter along to the JDOM
interest group regarding using the trove collections
(http://trove4j.sf.net) in JDOM.  It shouldn't be too difficult to do,
so it could be a nice task for someone who wanted to play with the
code but not worry about making any fundamental changes -- just
swapping in more efficient collection implementations!


Jason Hunter writes:
 > Interesting.  We stopped using LinkedList after b7 actually (ArrayList
 > was much better in all respects despite what we initially thought), but
 > this is an interesting library.  I'd suggest you post about it to
 > jdom-interest and see if anyone wants to give it a test whirl.  I myself
 > am too swamped to do it, but someone on the list might like
 > experimenting.
 > -jh-
 > Jason Baldridge wrote:
 > > 
 > > Jason and Brett,
 > > 
 > > Just in case you haven't heard about it yet, there is a project
 > > (trove4j) on sourceforge for efficient Java collections, licensed
 > > under the LGPL.  Memory and speed is often significantly improved, and
 > > there is a linked list implementation that actually behaves like a
 > > linked list in terms of performance.  I've seen here and there in JDOM
 > > code that you use linked lists, and the trove lists will use much less
 > > memory and be a good deal faster. There is also support for
 > > collections of primitive types.
 > > 
 > > Anyway, you can check it out at http://trove4j.sf.net.  The switchover
 > > to using trove classes is trivial in most cases.  The linked lists
 > > require you to implement the TLinkable interface, which is not tough,
 > > but does require either extending TLinkableAdaptor or implementing a
 > > few methods in every class that you want to use in a TLinkedList.
 > > 
 > > I saw that JDOM beta 8 is nearing completion --- looking forward to
 > > it!  Thanks for creating JDOM, it's been a real help in my work.
 > > 
 > > Cheers,
 > > Jason Baldridge

More information about the jdom-interest mailing list