PATCH: More collections List updates

Bryce McKinlay bryce@albatross.co.nz
Thu Nov 2 02:03:00 GMT 2000


Hi,

I have rewritten most of LinkedList. The new implementation is simpler,
faster and conforms to the spec more closely. While working on this I
realised the flaw in my previous change (removal of) the SubList
iterator in AbstractList: Although correct, it resulted in poor
performance for iterators on sublists of linked lists, as the iterator
would ultimately traverse the linked list via its get() method,
requiring quadratic-ish time. The fix was to restore the existing
iterator wrapper approach. A few other minor bugs are also fixed by this
patch.

Unfortunately, gcj can not build AbstractList any more due to a static
inner class bug (specifically, it cant handle the references to modCount
from the Sublist iterator anonymous class). So, what I'm going to do is
commit this patch to both classpath and libgcj, and then comment out the
offending lines in libgcj as a workaround until the compiler is fixed.

regards

  [ bryce ]



More information about the Java-patches mailing list