low level optimization

Rob Carriere rob at mckinley.eng.ohio-state.edu
Mon Apr 29 04:57:14 AEST 1991


In article <20270 at alice.att.com> wilber at homxb.att.com writes:
>Cross procedural optimization within a module doesn't buy you as much as you
>might hope; simply knowing that none of the calls to foo() within foo.c alias
>the parameters doesn't help if foo() is declared external (the default) because
>some call to foo() in another module might alias the parameters.  And I'd say
>that less than 10% of all functions in typical C code are declared static.
>(Even when functions aren't called outside of their modules, programmers rarely
>bother to declare them static.)

Well, the idea behind C has always been "the programmer knows what s/he is
doing."  Since that programmer _should_ have declared those fns static, I
don't see where I should be bothered by the fact that not doing so may inhibit
optimization.  

>Right now, in the Real World (TM), optimized Fortran really does run faster
>than optimized C.  A situation that truly sucks.

It seems to me that, like mister Giles, you are confusing properties of the
language with properties of the implementation.  It would sure be nice to have
those wonderful compilers today, but their presence or absence has nothing to
do with the merits or lack thereof of the language C.

SR
---



More information about the Comp.lang.c mailing list