× 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.



Thanks everyone,

Someone had dabbled with our custom compile pgm without telling anyone. A poor programmer spent the whole afternoon yesterday with another colleague trying to debug. I spent another half hour with him this morning before finding the cause of the problem. DSPPGM showed modules fully optimized.



-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Scott Klement
Envoyé : mardi 24 février 2009 10:50
À : RPG programming on the IBM i / System i
Objet : Re: CRTRPGMOD

Hello,

I agree with Chamara's interpretation of what the help file said.
Basically, to make the code as fast as possible, the optimizer takes "short cuts" that sometimes cause the debugger to provide incorrect information.

However, my experience is that optimizing makes programs harder to support while providing *no* noticeable performance gain.

Here's my suggestion: Write your programs and compile them normally.
Then, check to see if they perform adequately. If they do, great... if not, then try optimize(*full) and see if it makes any noticeable difference. If it does, great!

But I've been coding in RPG IV for 13 years now, and have run into many situations where performance was unacceptable. But never in all those times, did OPTIMIZE(*FULL) solve the problem. In all cases, I had to find a more efficient way of reading a file, or a more efficient algorithm in my code. It makes little sense to give up serviceability for a 0.001% performance gain. YMMV.


Chamara Withanachchi wrote:
OPTIMIZE(*FULL) generates the most efficient code -- and the compile
process also takes longer. The program should run faster than with
either of the other two options. The debugger will let you see (but
not change) field values; but the debugger may not show you the
correct current field values.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.