|
>Date: Sun, 22 Apr 2001 07:33:10 -0700 >From: "James W. Kilgore" <qappdsn@attglobal.net> > >There is a production program that gets run each night on this machine against >about 200,000 records that does a lot of Z-ADD's and takes about 25 minutes to >complete. Just out of curiosity, since this is on a CISC box, I'm going to >replace some of the Z-ADD's with MOVE's and see what difference it makes. I'll >report the results. Be very careful when replacing Z-ADD with MOVE. James, this isn't particularly directed at you (especially since you've established that the difference is insignificant) but rather at anyone reading this thread and thinking of setting up a new rule saying never to use Z-ADD. Consider these fields: NUM1 packed(5,2) value 123.45 dim(5) NUM2 packed(3,1) value 67.8 Starting with the NUM1 elements all having the same initial value, what values do the NUM1 elements have after each operation? What if NUM2 were -678.9? 1. Z-ADD NUM2 NUM1(1) 2. MOVE NUM2 NUM1(2) 3. MOVE(P) NUM2 NUM1(3) 4. MOVEL NUM2 NUM1(4) 5. MOVEL(P) NUM2 NUM1(5) If you don't know the answers immediately (without having to look in the manual to verify them) for at least the first three, then you should stay away from MOVE even if it's a bit faster. Even if you do know the answer you should stay away from MOVE for numerics. It's just too bizarre. Hint: all 5 answers are different. Barbara Morris +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
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.