From: | Dave Lloyd <dave@occl-cam.demon.co.uk> |
Newsgroups: | comp.compilers |
Date: | 8 Jun 1996 18:24:58 -0400 |
Organization: | Compilers Central |
References: | 96-05-061 96-05-163 |
Keywords: | UNCOL, C |
> I'm surprised no one has mentioned C as a resonably sucessful multi-langauge
> multi-target UNCOL. f2c,p2c,m2c, Scheme->C, sml2c, Mercury, ghc, .... all
Foot shot with the first example! C is terribly limited in scope and has some
really nasty holes in its type system. Important information gets lost when
squeezing down to C. Net result is that if you feed f2c to a good C compiler,
you will do worse on the sort of numeric fortran code than if you have a
natural Fortran compiler which understands complex arithmetic, arrays,
fortran no-alias parameter passing, equivalence and common blocks, loops
with a defined counter. Sure you can reconstruct most of this with decent
static analysis but it is harder (for which read more cases are excluded on
reasonable grounds of paranoia) than for a Fortran compiler starting with
this information.
As illustration, g77 produces substantially better code than f2c+gcc.
The situation is more absurd with Fortran 90 which provides more powerful
arrays and extensive array syntax that can be highly optimised with
comparatively cheap analysis (or for that matter directly invoke
hand-optimised BLAS).
Parallel programming constructs and exception handling make matters worse
still.
----------------------------------------------------------------------
Dave Lloyd Email: Dave@occl-cam.demon.co.uk
Oxford and Cambridge Compilers Ltd Phone: (44) 1223 572074
55 Brampton Rd, Cambridge CB1 3HJ, UK
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.