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

Evgeny Kotsuba evgen at shatura.laser.ru
Tue Jan 4 01:27:42 CET 2005


Matthias Andree wrote:

>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.
>  
>
Well, I don't what to disput - as for me more readable is sizeof(),  you 
like strlen() - let it be, but then use constat int ;-)
I agree that this is very little effect on optimization.
On the other hand  I am not satisfied with 10 messages/sec at Athon and 
can't find were those inner layers for optimization are.

SY,
EK





More information about the bogofilter-dev mailing list