I keep answering myself. Is this a sign of mental illness? or just loneliness?

At 12:48 AM 5/9/1998 -0500, you wrote:
>Brad
>
>-snip-
>
>Opinions, history, etc., are interesting, but can we get some facts? I
>think I'll go generate an IR (intermediate representation). Actually, that
>might be interesting and even helpful. <bg>
>
>===================================================================
>
>Adding to the previous post:
>
>I created some little RPG III programs, basically as follows, and specified
>GENOPT(*LIST), which puts the resulting MI into the source listing.
>
>    READ      (executed only once, so I include in inside read)
>    DOW       (adds to size of program)  
>    READ      17 MI instruction / loop
>    ENDDO     118 bytes
>
>    DOU       18 MI instruction / loop
>    READ      128 bytes
>    IF
>    LEAVE
>    ENDIF
>    ENDDO
>
>    DO        16 MI instruction / loop
>    READ      118 bytes
>    IFEQ
>    LEAVE
>    ENDIF
>    ENDDO
>
>It looks like the last one is, in fact, the most efficient. However,
>looking at the IR, it seems that the first 2 stay in the loop and the last
>one does not. In fact, I just ran it and that is exactly what happens—it
>goes through the cycle for each read!
>
>Definitely, number one has fewer operations and should be faster. I just
>ran both over a file of about 9000 records, record length about 450. The
>DOW took 4 seconds, the DOU 5 seconds. Convinces me!

I ran all 3 against a larger version of the same file: c. 169,000 records,
c. 450 length. I ran one of the programs before actually testing, to
minimize paging. Results:

DOW with priming read:     :36

DOU without priming read:  :42

DO without priming read:  1:08

These were run on a dedicated machine (F80). The last one was surprising to
me, since it would appear that it should be faster. In fact, as I said
above, it leaves the 'block' and runs through the cycle for each read. I
had to put my startup timing statement into an *INZSR, so that it'd run
only once.

The last one might benefit from the cycle-suppressing statement we can now
use, if we're at v4r1 and later (or is it v3r7?).

These benchmarks include only READs, not any additional processing per
record. Any additional processing will reduce the improvementin
performance, since the READs will take up a smaller proportion of total
activity.

But, in conclusion, the priming READ gives a 14% improvement over the DOU
with internal IF. YMMV

HTH

Vernon Hamberg
Systems Software Programmer
Old Republic National Title Insurance Company
400 Second Avenue South
Minneapolis, MN  55401-2499
(612) 371-1111 x480


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2019 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 here. If you have questions about this, please contact [javascript protected email address].