Mike Preece wrote:
A subroutine is a C function call and as such is fairly inexpensive in and of itself. However, when a subroutine is called:On Apr 8, 3:45 am, Jim Idle <[email protected]> wrote: The system must initialize the call heap with any local (C level) variables (not too expensive if there are relatively few storage locations, which jBASE tries to minimize, jBASE must initialize any local jBC variables to the value required for the emulation and allocate the storage in some cases such as when the default is "" jBASE must tear down any jBC variables that were local to the subroutine. If all variables used in the subroutine are COMMON, then the overhead is/can be greatly reduced. But if the subroutine is called a million times in a batch program, and if this is compounded with a subroutine call for everything, such as getting the next element from a list and so on, then the overhead of calling subroutines vs using the native language constructs is enormous in relative terms. Obviously, a READ statement goes pretty much straight to the runtime and while subroutines are call-by-reference (so at least you don't need to copy the READ buffer to return the value), a call to the runtime is always going to be better than a call to a subroutine. On the upside, calling subroutines in jBASE is much less of an overhead than it is in say UniVerse, so overall programs using this behavior will be lots better under jBASE. Also, we should remember that some of the reasons for calling T24 subroutines are to do with security and best practices as well as providing more of an API than just reading a file (at least I believe so for most things), so the overhead involved may be somewhat necessary. Jim --~--~---------~--~----~------------~-------~--~----~ Please read the posting guidelines at: http://groups.google.com/group/jBASE/web/Posting%20Guidelines IMPORTANT: Type T24: at the start of the subject line for questions specific to Globus/T24
To post, send email to [email protected]
|
- Re: T24: Running routine under jShell Jim Idle
- Re: T24: Running routine under jShell Gayathri Ramakrishnan
- Re: T24: Running routine under jShell Gayathri Ramakrishnan
- Re: T24: Running routine under jShell Saravanan Thangavelu
- Re: T24: Running routine under jShell Igor Micev
- Re: T24: Running routine under jShell Praveen
- Re: T24: Running routine under jShe... Jim Idle
- Re: T24: Running routine under... Igor Micev
- Re: T24: Running routine under... Richard W
- Re: T24: Running routine under... Mike Preece
- Re: T24: Running routine u... Jim Idle
- Re: T24: Running routine u... Igor Micev
- Re: T24: Running routine u... Mike Preece
- Re: T24: Running routine u... Jim Idle
- Re: T24: Running routine u... Mike Preece
- Re: T24: Running routine u... Jim Idle
- Re: T24: Running routine u... Mike Preece
- Re: T24: Running routine u... Jim Idle
