C common practice. (was: low level optimization)

David Wolverton daw at cbnewsh.att.com
Tue Apr 30 08:01:39 AEST 1991


In article <22649 at lanl.gov>, jlg at cochiti.lanl.gov (Jim Giles) writes:
> One of the assumptions (which is still valid most places) is that
> no interprocedural analysis is done - even _within_ a file, even 
> though the language permits such optimizations.  The result is that
> there really is a tendency to maintain C code as numerous separate
> files.  ...[stuff deleted]...
> I don't maintain that keeping code in separate file is necessarily
> bad or good.  But to pretend that it is not common practice is to 
> ignore reality.  This common practice may in (the near) future result 
> in less efficient code because of missed optimization.

I can't say about "most places", but I _can_ say that we
built a commercially-available 3B2 C compiler here in 1986
that did some interprocedural stuff within a source file.

Our biggest customer was a project with _thousands_ of
functions, one per file.  We tried mightily to get them
to group related functions into a single file, but their
"project methodology" wouldn't allow it.  So they could
never take advantage of that group of optimizations.

Dave Wolverton
AT&T Bell Labs



More information about the Comp.lang.c mailing list