|
Ah, there's the rub "... wherever it makes sense." That's the part open
to human emotions.
Some might change from a DIV to a MULT to save .005 seconds on a 5 million
record process. Those same won't change from RPG file handling to SQL
handling to shave a minute off that same process, even if they're the ones
that ran the time trials and found the better performance did come from
SQL.
Rob Berendt
--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
Benjamin Franklin
"Bill" <billzbubb@xxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/15/2003 01:13 PM
Please respond to RPG programming on the AS400 / iSeries
To: "RPG programming on the AS400 / iSeries"
<public-rpg400-l=Zwy7GipZuJhWk0Htik3J/w@xxxxxxxxxxxxxx>
cc:
Fax to:
Subject: Re: Multiply Versus Divide
Scott Klement wrote:
>> My experience is like Bill's. If the program is a heavy hitter and
>> you can easily keep DIV out of the code its worth it.
> This means that if you had code that does ONE MILLION divides, you
> would waste about 14 seconds.
>
> It's definitely not worth making your code harder to read to save 14
> seconds per day in some big million record processing batch job.
While I agree with the statement about not making code harder to read, I
will disagree that the code is harder to read just because it uses
Multiply
instead of Divide.
> In any application you write where you "save time" by using MULT
> instead
> of DIV, I can almost guarantee that there's something else in that app
> that's wasting more time than the difference between MULT and DIV.
Maybe true, but I think time should be saved wherever it makes sense.
Bill
_______________________________________________
This is the RPG programming on the AS400 / iSeries (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 mailing list archive is Copyright 1997-2025 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.