Path: 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 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