🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #2461

Re: Fortran vs. C for numerical work

#2461
From: Jim Giles
Date: Sun, 09 Dec 1990 22:06
18 lines
1228 bytes
From article <1990Dec9.040635.12696@actrix.gen.nz>, by Bruce.Hoult@bbs.actrix.gen.nz:
> [...]
> In C or Pascal you could allocate a structure as a global (static) variable,
> assign your parameters into it and just pass a pointer to the structure to
> the called routine.  The compiler might even be smart enough to use CALLG,
> but in any case the CALLS will be much faster pushing only one parameter.

Of course, copying the data into the globals might be a chore.  And,
putting all your data permanently into a global is probably not a
good plan either.

Now, Pascal doesn't allow separate compilation.  So it _could_ use the
faster call on those routines determined not to be recursive (which
can be detected at compile time in Pascal).  In C, the same trick
_could_ be used, but only if you put all your procedures into the
same source file.

J. Giles
Technical Details
Message-ID: <8367@lanl.gov>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cmcl2!lanl!jlg
References: <1990Dec9.040635.12696@actrix.gen.nz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cmcl2!lanl!jlg
From: jlg@lanl.gov (Jim Giles)
Newsgroups: comp.lang.misc
Subject: Re: Fortran vs. C for numerical work
Message-ID: <8367@lanl.gov>
Date: 9 Dec 90 22:06:53 GMT
References: <1990Dec9.040635.12696@actrix.gen.nz>
Organization: Los Alamos Natl Lab, Los Alamos, N.M.
Lines: 18