In message <[EMAIL PROTECTED]>, Allen Egerton <[EMAIL PROTECTED]> writes
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.

Indeed, I believe that the compiler converted CALL *s into CALL @s. It would create and initialise a temporary variable, then put CALL @ code into the executable.

Cheers,
Wol
--
Anthony W. Youngman <[EMAIL PROTECTED]>
'Yings, yow graley yin! Suz ae rikt dheu,' said the blue man, taking the
thimble. 'What *is* he?' said Magrat. 'They're gnomes,' said Nanny. The man
lowered the thimble. 'Pictsies!' Carpe Jugulum, Terry Pratchett 1998
Visit the MaVerick web-site - <http://www.maverick-dbms.org> Open Source Pick
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to