[cvs] bogofilter/src mime.c,1.33,1.34

Matthias Andree matthias.andree at gmx.de
Tue Jan 4 01:02:42 CET 2005


Evgeny Kotsuba <evgen at shatura.laser.ru> writes:

>>Compilers IMO are supposed to evaluate all constant expressions at
>>compile time - GCC 3.3 and ICC 8.1 certainly are:

> but calls are not supposed to be inlined  for all function calls

The input is constant, strlen is a pure function (i. e. without side
effects, just returns a value), no reason to worry.

If the compiler insists on calling out to strlen, well, its business,
not ours.

I don't live to waste my time "hand-optimizing" constructs that 1. a
decent compiler can figure out and that 2. are run seldomly. I might
consider hand-optimizations for tight inner loops.

> Can you guarantee  that this will have place with more complex function 
> and source file ?

Readable and concise code is the prime directive, not hand-optimizing on
outer layers that are called infrequently.

-- 
Matthias Andree



More information about the bogofilter-dev mailing list