Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Recursive Function
Inline comments >>
>> I'm older; I started with machine-language. Makes me a trochlodyte?
From an old 'C' and Pascal programming dinosaur:
While I was working in an R&D department two decades ago, coding low-level IO-functions on proprietary databases and SW-development tools, I learned that passing variables 'by reference' (in/out in PL/SQL) was cheaper, because the value didn't need to be pushed on the stack, but just a referring pointer, which was less bytes most of the times.
>> To check means more CPU time, so more wall-time, so less performance??
But those days switching of boundary checks in the (USCD-P) compiler caused
a significant gain in performance.
>>>> How would you pass these values 'back'?? Some global variables (in a
pkg?, something like this?)
>>>> If you don't have an error, what error-codes would you put back. And in
reverse: if you got an error, what function value would you give back?
What I particularly like to do is passing results (error-codes) back through the function, whilst the result of the function itself is passed through the variables.
>>That may be old fashioned. But it works flawlessly. The first time I wrote
some Oracle code I did it like this and I heard that I was old fashioned. I
didn't give a ...
Of course raising exceptions is the mechanism for
that now, so my way of working might be somewhat old-fashioned. Unskyld.
However, when I've got some spare time I would like to test whether passing by reference is cheaper in PL/SQL as well, especially when using huge variables to a procedure and/or function. Of course this depends on the calling mechanism that Oracle implemented in its PL/SQL engine. Maybe some insider, e.g. Steve Adams, can disclose a clue about this?
Regards, Carel-Jan
Regards, Rob Zijlstra
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Sun May 09 2004 - 14:44:58 CDT
![]() |
![]() |