Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx01.iad01.newshosting.com!newshosting.com!novia!news-out.readnews.com!news-xxxfer.readnews.com!news.misty.com!news.iecc.com!nerds-end From: glen herrmannsfeldt Newsgroups: comp.compilers Subject: Re: PL/I code Date: Sat, 5 May 2012 05:20:56 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 50 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <12-05-005@comp.compilers> References: <12-04-070@comp.compilers> <12-04-077@comp.compilers> <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> NNTP-Posting-Host: news.iecc.com X-Trace: leila.iecc.com 1336275782 47225 64.57.183.58 (6 May 2012 03:43:02 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Sun, 6 May 2012 03:43:02 +0000 (UTC) Keywords: PL/I, history, code, comment Posted-Date: 05 May 2012 23:43:02 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com X-Received-Bytes: 3039 Xref: csiph.com comp.compilers:634 robin 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]