|
Hello John,
Interesting exercise. I didn't bother to respond earlier even though I didn't
believe
the original premise. I simply said "Bollocks" and discarded the note. I'm
feeling a
little more loquacious this evening. It only takes a little thought to
disprove the
premise. The benchmark evidence is useful for substantiation.
It is true that a qualified call requires two resolutions: Resolve library then
resolve object, therefore requiring the compiler or MI programmer to issue two
calls
to RSVLSP.
1 - Resolve context
2 - Use pointer to resolved context when resolving object
However a call to RSVLSP with no context information results in the name
resolution
list (what you know as the *LIBL) being searched linearly. The NRL can contain
15
system libraries, 25 user libraries, 2 product libraries, and the current
library, and
even though the NRL contains resolved pointers (an array of 43 system
pointers),
resolving the actual object requires a call to RSLVSP for each entry in the NRL
until
the object is found -- in the worst case a total of 43 resolutions.
Note that the above is not true when resolving an object that can only exist in
the
machine context. In that case a single resolution is performed.
Ergo, a qualified call is faster than an unqualified call when the NRL contains
more
than two contexts. Quod erat demonstrandum!
None of which has any bearing on whether qualified calls are a good idea or not!
Regards,
Simon Coulter.
«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
«» FlyByNight Software AS/400 Technical Specialists «»
«» Eclipse the competition - run your business on an IBM AS/400. «»
«» «»
«» Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 «»
«» Fax: +61 3 9419 0175 mailto: shc@flybynight.com.au «»
«» «»
«» Windoze should not be open at Warp speed. «»
«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-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 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.