Hello,
On Tue, 28 Sep 2004 10:38:34 +0200
Ceki G�lc� <[EMAIL PROTECTED]> wrote:
> static double loopLinkedList() {
> long before = System.currentTimeMillis();
> ListIterator litcc;
> for(int i = 0; i < RUN_LENGTH; i++) {
> litcc = llhead;
> while(litcc.hasNext()) {
> tmp = (String) litcc.next(); <---- WE NEVER GET HERE
> }
> }
Thats not exactly right. It is called during the first run of the
RUN_LENGTH loop, then hasNext() always is false because the old
ListIterator is used again.
But this just invalidates the Test results I have posted just before, so
forget them...
> I very much doubt that any abstract data structure found in
> java.util.* can compete with the specialized structure we currently
> have for looping on filters. The current stuff is limited in
> functionality but highly optimized for the task.
One point is that the abstract data structure may be optimized using
native code, depending on the jvm. On the other hand, a good JIT is able
to do an equal or even better job.
So far,
Markus
--
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 z�rich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:[EMAIL PROTECTED] | www.logi-track.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]