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



I wonder whether there's any benefit to be derived from calling C-functions
instead of doing the RPG ops, e.g. qsort rather than SORTA and bsearch
rather than %lookup?

Probably not. Maybe Bob Cozzi would know but I wouldn't be surprised if,
under the covers, SORTA actually uses qsort and %lookup actually calls
bsearch!

One other question. How are you reading the records from the IFS? Are using
the UNIX-style APIs ("read") etc.? If so, are you calling "read" 2 million
times specifying a small buffer size (the record length)? You might find
it's quicker to read the whole file (or as much as will fit) into a maximum
size user space with a single "read" operation and then process the the
buffer.

Pete

"Richard B Baird" <rbaird@xxxxxxxxxxxxxxxxxxxxx>
wrote in message
news:OF1ED7B429.2A83BE6B-ON05256D4B.005FAC92-05256D4B.005FAD76@xxxxxxxxxxxxxxxxxxxxxxxx
>
> Booth,
>
> can't use the cycle - I'm reading the 2 million records strait from the
> IFS, in CSV form.
>
> I'm loading my lookup table from a physical, and since i have to sorta
> anyway, i'm reading it sequentially - but that's only a thousand reads or
> so, so I don't think that's going to make a big difference in the 2mil ifs
> reads scheme of things.
>
> btw, i am one of those heretics who still uses the cycle, level breaks and
> on rare occasions, (horrors!!!) matching records!.   if it works, don't
> rewrite it ;)
>
> Rick
>
> -------original message---------
> I am curious if removing the K from the F-spec would make a difference i
> performance that is more noticeable than a faster %Lookup?
>
> (I won't even mention using Matching records and Primary/secondary.)
>
>
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
>




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.