|
Regarding the efficiency of array processing... Things have changed since the early days. Sequenced (ascend/descend) arrays no longer use sequential lookup. They instead take advantage of binary search, a pretty darn fast mechanism. Regarding the use of files... There is considerable associated overhead. User index is a much more efficient approach and I see that Steve here sometimes uses them, too. The user index approach takes care of the need to redimension and in an efficient manner. Gary Guthrie Steve Landess wrote: > > I am total agreement with you, Booth. IIRC, array processing is one of the > most inefficient things that you can do in an RPG program. > > I don't see a reason to use such a large array in a program. I typically > use a user index or create a work file in QTEMP with the necessary PF keys > and/or LGL files to process the data when the number of elements gets very > large. It may take a little more code, but using one of these techniques is > much more efficient than using a large array. Plus, using a work file is > definitely dynamic, since you can specify SIZE(*NOMAX) when creating the > file.
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.