Taking advice from others on this list, I wrote a small program to compare
the execution time of extracting 10000 elements from an MV list using
FOR/NEXT loop with <1,I> delimiters verus using LOOP/WHILE with REMOVE. I
should note this was done on Unidata 6.0.3.
All the previous comments are still valid - the LOOP/WHILE with REMOVE
beats a FOR/NEXT loop dramatically. That is, on an MV list with 10000
elements, FOR/NEXT took about 6500 milliseconds while LOOP/WHILE took 15
milliseconds (that's not a typo).
I ran the test 10+ times, I reversed the order of the tests and the result
was the same every time.
So if you need to loop over all elements in an MV list, the
LOOP/WHILE/REMOVE structure seems inherently more efficient than the
FOR/NEXT/<1,I> notation.
Jeff Butera, Ph.D.
Administrative Systems
Hampshire College
[EMAIL PROTECTED]
413-559-5556
"...our behavior matters more than the beliefs that we profess."
Elizabeth Deutsch Earle
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/