Re: not a lot of memory, was Optimization techniques and undefined behavior

Bart <bc@freeuk.com>
Fri, 3 May 2019 12:45:02 +0100

          From comp.compilers

Related articles
| List of all articles for this month |
From: Bart <bc@freeuk.com>
Newsgroups: comp.compilers
Date: Fri, 3 May 2019 12:45:02 +0100
Organization: virginmedia.com
References: 19-04-021 19-04-023 19-04-037 19-04-039 19-04-042 19-04-044 19-04-047 19-05-004 19-05-006 19-05-016
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="6000"; mail-complaints-to="abuse@iecc.com"
Keywords: history, performance, comment
Posted-Date: 03 May 2019 13:51:26 EDT
In-Reply-To: 19-05-016
Content-Language: en-GB

On 03/05/2019 00:48, Bart wrote:


> [There have been plenty of compilers that did bound checking.  Back in
> the 1960s and 1970s the WATFOR Fortran compilers, originally for the
> 7040 and later IBM 360/370 and later PDP-11 did bound checking and
> also checks for uninitialized variables.
>
> IBM had two PL/I compilers, the checkout compiler that generated
> interpreted code with extensive runtime checks and the optimizing
> compiler that generated fast machine code.  It was possible if painful
> to compile part of your program with one and part with the other and
> link the code together.  Oh, and each compiler ran in 44K bytes of
> RAM.  Take that, 8-bit micros. -John]


That's a little unfair on 8-bit micros.


Those other machines probably had the benefit of better instruction sets
and wider register and data sizes. So 44KB could go further.


They also probably made use of hard drives, while the 8-bit machines I
used had floppy disks a lot of the time, which were too slow to use for
things like multi-pass compilers. So more had to be done with a given
amount of RAM.


Looking up this particular compiler, it seems it was written in assembly
language, while the ones I did for Z80, after the first one, were
written in their own HLL.


But the main pressure was in keeping generated code small, and ensuring
it ran fast enough. Adding array bounds and numeric overflow checking
wouldn't have helped. I suspect the IBM 360 was also somewhat faster
than my 4MHz Z80.
[My sources say the checkout compiler was written in PL/S, a PL/I
subset IBM used for system programming. The 360 came in different
models. The smallest was a 360/30 which you could configure with 64K
of disk and a 5MB disk and card reader/punch and printer which I think
was enough to run the PL/I compilers. It was really slow. A
register-register add took 22us, 16 bit memory-register add 27 us, 32
bit multiply 235us. The 360 instruction set has 32 bit registers but
the /30 implemented it in microcode with 8 bit data paths and the
"registers" in core. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.