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



On Wed, 2005-12-14 at 13:28 -0500, Fleming, Greg (ED) wrote:
> We had a discussion about this on the RPG-L list last week,
> And referred to an even earlier discussion here:
> http://archive.midrange.com/rpg400-l/200503/msg00881.html
> 
> The upshot is that there is no bug, but the way READE was designed
> prevents it from taking advantage of record blocking, so it has to hit
> the actual file for each record it fetches, rather than reading it from
> memory.
> 
I've seen this argument before, but I don't think it holds water.

If I want to work with a section of the file, the suggestion has been to
replace READE with READ and your own test.  This implies using the 'K'
option on the file spec (so that SETLL will work), which also means that
I will be using an index, and accessing records all over the file, not
necessarily sequentially.

So, blocking should not help appreciably, yet this is the argument often
given.  In my opinion, there should be very little difference in how
these perform, and if not, there is an implementation level bug.

Therefore, I wrote two programs to test this:

read_test
http://code.midrange.com/index.php?id=43c4fd6a02

reade_test
http://code.midrange.com/index.php?id=e3203a5c0b


On the test system, the 5000 accounts own about 145,000 transactions.
There are about 700K accounts and 11M transactions total.  As you might
imagine, the transactions are somewhat randomly distributed in the file.

I ran each program several times, and the timings were quite similar.
The READE version completed on average in about 16.5 seconds, where the
READ version completed on average in about 16 seconds.



Regards,
Rich


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.