× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi, Bryce:

Some questions:

1. what version / release of OS/400 or i5/OS are you compiling and
running this on?
2. what TGTRLS are you specifying on the CRTRPGMOD or CRTBNDRPG commands?

Also, could you post (a small version of) your "test" program(s) at code.midrange.com and post the link generated, so that some of us who might want to try to reproduce your results, on different versions / releases of OS/400, can do so more easily?

Thanks,

Mark S. Waterbury

> On 6/17/2011 9:37 AM, Bryce Martin wrote:
Ok, so out of curiosity yesterday I was doing some DOW vs FOR comparisons
and thought that while I was at it I would do a performance test...and
this uncovered something interesting...

Here's the long of the short of it...
DOW is 3x faster than FOR. If you use OPTIMIZE(*FULL) then the gap is
even greater.

Now, before anyone says it... yes...we're talking about milliseconds here.
But think of all your programs that have loops...yep, almost all of them.
So I guess my main question is this...

Why the big relative difference? How is it that FOR can be so much worse
than DOW? You can actually see a difference if doing 10's or 100's of
millions of iterations. So while most people won't see a difference in
individual instances, if all your FOR loops were 3 times faster in all
your programs, I can't help but think you might be able to see some actual
performance across a fairly taxed system.

I don't know... just ruminating. Anybody have any gritty details?

See this link for code and discussion....
http://www.code400.com/forum/showthread.php/10499-DOW-x-lt-y-is-3-times-faster-than-using-for-x-number-downto-1


Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777
--- This message (including any attachments) is intended only for the use of the individual or entity to which it is addressed and may contain information that is non-public, proprietary, privileged, confidential, and exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us and destroy this message immediately. ---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.