[comp.sources.d] ptc - not just a Pascal to C converter, a Pascal optimizer too!

john@basser.oz (John Mackin) (08/04/87)

I've put up ptc on our machine, which is a 780 with a pcc-derived
C compiler and Berkeley Pascal.  I think that this is a pretty
common configuration, so I thought others with a similar setup
might like to know that ptc will serve them as a good Pascal
optimizer, producing 15% improvement in speed and 30% in text
size.  Here are the numbers (cptc.c is ptc.p's output, when executed
on itself):

$ ls -l cptc.c ptc.p
-rw-r--r--  1  john    s     247609 Aug  5 02:52 cptc.c
-rw-r--r--  1  john    s     216865 Aug  5 01:33 ptc.p
$ time ptc <ptc.p >1.c
685.5u 47.7s 889r 	 ptc
$ time cptc <ptc.p >2.c
592.6u 42.0s 736r 	 cptc
$ cmp 1.c 2.c
$ size ptc cptc
text	data	bss	dec	hex
156672	20480	10308	187460	2dc44	ptc
108544	17408	10948	136900	216c4	cptc

John Mackin, Basser Department of Computer Science,
	     University of Sydney, Sydney, Australia

john@basser.oz.AU (john%basser.oz@SEISMO.CSS.GOV)
{seismo,hplabs,mcvax,ukc,nttlab}!munnari!basser.oz!john