Re: const functions

From: Alex Rousskov <rousskov@dont-contact.us>
Date: Tue, 23 Oct 2001 08:39:12 -0600 (MDT)

On Tue, 23 Oct 2001, Robert Collins wrote:

> This one I disagree with. The compiler is ignorant of functions in
> different files - or even in libraries. If the compiler had information
> from the previous invocations with which to work, then sure it could be
> the compilers job. But for now I don't think any compiler will optimise
> out (say) library calls - unless such a hint it provided to it.

It is a limitation of GCC. Nothing prevents A compiler from optionally
looking into different files and making educated guesses as well as
maintaining meta-information about already compiled files. I believe
there are IDEs that do that.
 
> (Mind you, library calls that have no side effects and only depend on
> the arguments probably should be macros).

I am against macros that could be implemented as functions.

Again, I doubt there will be any measurable improvement in Squid
performance even given all overheads of nested function calls.

Alex.
Received on Tue Oct 23 2001 - 08:39:29 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:35 MST