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

There are a number of advantages for qsort in particular.  Most of the
advantages of bsearch disappear with the advent of %Lookup.

Major advantages are:

 1) qsort can sort anything - into any sequence.  It can sort an array, or a
MODS, or any single chuck of memory.
 2) You determine the sort sequence.  Using qsort you can get "ACME" and
"Acme" and "acme" to be sequenced together, since you completely control the
sort sequence.
 3) qsort can sort dynamic memory - SORTA requires that the memory for the
whole array be allocated.
 4) SORTA sorts the whole array - even if only 20% of the entries are
filled.  qsort sorts as many elements as you tell it to.

Of these, only 1 and 2 really apply to bsearch - %lookup handles 3 and 4.

Jon Paris
Partner400
www.Partner400.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.