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



cozzi@xxxxxxxxx wrote:
Hans,
>>performance difference disappears with optimization
Oh great! Now I have to tell people to use optimization. <tic>
I've always said, if you must use optimization use *BASIC with RPG as
using *FULL will take more time to compile than you will every save in
runtime performance. :)

;-)


Actually, you're looking at pretty minor differences in pretty speedy operations anyways, so I wouldn't worry too much. As Barbara said, it's like standing on a stool to get closer to the Moon. If you want to improve the performance of the typical RPG program, look at the database operations first, and the choice of algorithm second. If you want to play with OPTIMIZE(*FULL), fine, but do so within a framework of performance testing so you can quantify the benefits.

BTW, I did one more test just now. I compared the performance of "EVAL A=B+B;" for binary decimal and integer variables. Since the operation in binary decimal involves that conversion to packed decimal, it's more than an order of magnitude slower than the integer addition. (The ratio is roughly the same with or without optimization, BTW.)

So it would appear that the ordinary bin->bin assignment is the odd-ball here, and probably /should/ involve a packed decimal conversion in order to implement the decimal semantics properly. But to be practical, I don't see us changing how that works.

Bottom line: For general numeric operations, the default choice should be integer. Use one of the decimal numeric formats for values with decimal places, like money values. Use float numeric format when computing rocket trajectories.

Cheers! Hans


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.