David Wolverton wrote:
<snip>
Anyone have a clue why the indirects are a hair faster? Or am I just getting
lucky over and over? I always thought they were slower as well!
In Prime's implementation, which I *believe* was carried over to
Universe, the *first* reference to @PROGNAME has to "resolve" the
reference. Which means that it looks up the address that the routine's
loaded into. Every subsequent reference uses the already resolved
reference. Which is *fast*.
So, the programming practice is to define it, "snap the link" the first
time you call it, then keep calling it. Minimal overhead, and gives you
a great deal of flexibility in coding.
An example of the flexibility would be:
BEGIN CASE
CASE COMPANY EQ "COMPANY.1"
INVOICE.RTN = "INVOICE.RTN.COMPANY.1"
CASE COMPANY EQ "COMPANY.2"
INVOICE.RTN = "INVOICE.RTN.COMPANY.2"
CASE 1
INVOICE.RTN = "INVOICE.RTN.GENERIC"
END CASE
....
....
CALL @INVOICE.RTN (argument list)
--
Allen Egerton
aegerton at pobox dot com
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/