Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #634
| From | glen herrmannsfeldt <gah@ugcs.caltech.edu> |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Re: PL/I code |
| Date | 2012-05-05 05:20 +0000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <12-05-005@comp.compilers> (permalink) |
| References | (2 earlier) <12-04-081@comp.compilers> <12-04-082@comp.compilers> <12-04-084@comp.compilers> <12-04-085@comp.compilers> <12-05-004@comp.compilers> |
robin <robin51@dodo.com.au> wrote: (snip) >> There is, at least, more overhead in the procedure entry/exit >> sequence for recursive routines. > More overhead, maybe, but how much more? Registers usually have to be > saved, a return address has to be preserved somewhere. When the > machine has a stack, those things can go on the stack. There appears > to be no extra overhead. When the machine does not have a hardware > stack, one must be simulated, or, space must be made available for > saving those things, at each recursive call. In that case, a request > from the OS may need to be made for the storage. The request will add > to overhead. But again, how much extra? For the PDP-10/TOPS-10 Fortran, return addresses went on the stack, but local variables were still static, as usual for Fortran IV. OS/360 Fortran compilers use static storage for local variables and save areas (including the return address). No overhead for allocation. (snip) >> In the case of a local array, the compiler can make some optimizations >> that it can't make for a procedure argument. (snip) > In Fortran (90 or later), the descriptor holds, or can hold, > the stride value. Thus, a called procedure can access > non-contiguous elements in a single loop. (snip) >> PL/I allows array cross sections that can be non-contiguous. > The elements in a cross-section are contiguous for rows, > but not for columns (in a matrix). However, the elements are > separated from each other by a constant amount, so a single loop > suffices (as you would expect, because only one subscript varies). I suppose for a 2D array the elements will have a constant stride, but not for a higher D array. -- glen [That must be the new PDP-10 compiler. The old compiler, which looked a whole lot like OS/360 Fortran G, used JSA/JRA for subroutine calls, which saved the return address register in the first word of the subroutine. -John]
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar
Decades of compiler technology and what do we get? Robert AH Prins <robert@prino.org> - 2012-04-22 18:57 +0000
Re: Decades of compiler technology and what do we get? Robert AH Prins <robert@prino.org> - 2012-04-22 22:14 +0000
Re: PL/I nostalgia, was Decades of compiler technology and what do we get? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-23 00:03 +0000
Re: PL/I nostalgia "robin" <robin51@dodo.com.au> - 2012-04-25 09:07 +1000
Re: PL/I nostalgia glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-24 23:52 +0000
Re: PL/I nostalgia "robin" <robin51@dodo.com.au> - 2012-04-28 21:30 +1000
Re: PL/I nostalgia glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-28 16:11 +0000
Re: PL/I nostalgia Robert A Duff <bobduff@shell01.TheWorld.com> - 2012-04-29 10:16 -0400
Re: PL/I code "robin" <robin51@dodo.com.au> - 2012-05-05 00:45 +1000
Re: PL/I code glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-05-05 05:20 +0000
Re: Fortran calls, was PL/I code glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-05-06 05:13 +0000
Re: Archaic hardware (was Fortran calls) "robin" <robin51@dodo.com.au> - 2012-05-09 10:46 +1000
Re: PL/I nostalgia "robin" <robin51@dodo.com.au> - 2012-09-19 11:04 +1000
Re: PL/I nostalgia glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-09-19 03:56 +0000
Re: PL/I nostalgia "robin" <robin51@dodo.com.au> - 2012-09-21 13:53 +1000
Re: PL/I nostalgia glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-09-21 07:00 +0000
Re: PL/I nostalgia "robin" <robin51@dodo.com.au> - 2012-09-30 10:45 +1000
csiph-web