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


  • Subject: RE: New RPG Redbook (was Sub Files).(and quick sort)
  • From: Joel Fritz <JFritz@xxxxxxxxxxxxxxxx>
  • Date: Tue, 14 Dec 1999 11:49:06 -0800

That was why I wrote the demo code that way.  I was timing it against SORTA.

For a one time call it's a lot easier to pass the procedures as parameters.
If I remember from when I was playing with it, (last year) the difference
between passing variables vs. executing the procedure calls was in
milliseconds for 100 iterations.  It's scary how long(short) things actually
take.  A lot of the things I learned about optimizing code (which are still
applicable, in a way) came from when I was in school using 286s and low end
386s.  A few months ago I wrote a C program for the first time in 7 or 8
years and discovered that using a register integer for a loop control
variable made virtually no difference in a 25 iteration loop that executed
10,000 times.   

It would be a pretty cool compiler trick if it could analyze a loop and find
the procedure calls that were returning the same value every time and create
temporary variables for the return value.

> -----Original Message-----
> From: Jon.Paris@halinfo.it [mailto:Jon.Paris@halinfo.it]
> Sent: Tuesday, December 14, 1999 10:58 AM
> To: RPG400-L@midrange.com
> Subject: RE: New RPG Redbook (was Sub Files).(and quick sort)
> 
> 
> 
> 
>  >> Do the bifs in the procedure call as described below 
> execute every time the
> procedure is invoked in a loop?
> 
> Yes they do - but why would you do the sort 100 times anyway 
> - in real life
> you'll likely only do it once for each set of values.  I 
> think the demo code
> probably did it 100 times for timing purposes 'cos it's too 
> fast to time
> otherwise.
> 
> 
> +---
> | 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
> +---
> 
+---
| 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 thread ...


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.