[jdom-interest] Re: New realease, Text class... Arghh
Bradley S. Huffman
hip at a.cs.okstate.edu
Wed Jan 9 17:16:39 PST 2002
Dennis Sosnoski writes:
> I'm glad to see that JDOM is adding these methods
May add these methods, I just hack and submit ;)
> I'm not sure it's entirely fair to say "those test have a problem",
> considering that I used what appeared to be the best methods available
> in the released version of the code. ;-)
It wasn't about which JDOM methods you used, but about using a Iterator
to trasverse a List inside a recursive method (BenchJDOM.walkElement).
This caused the test (not JDOM) to added a additional time pentaliy.
Granted, the change to using a for loop still doesn't give JDOM the best
times, but the test should be as neutral as possible.
In all fairness I would of used a Iterator myself and not given it a second
thought. But now after seeing a good example of how it can affected things,
I've made a mental note to always use a for loop and List.get(int) unless
I need the functionality of remove.
Ahhh, the joys of objects.
More information about the jdom-interest