Re: [exim-dev] RFC: Refactoring expand_string_internal

Pàgina inicial
Delete this message
Reply to this message
Autor: Nico Erfurth
Data:  
A: exim-dev
Assumpte: Re: [exim-dev] RFC: Refactoring expand_string_internal
Sheen, Tony wrote:

> For maintainability, the worst program I ever worked on had just a single
> function - main() - but it ran like greased lightning which was the main
> requirement! Formatting it nicely with 'proper' functions reduced its speed
> by almost 15%.
>
> I now tend to avoid using lots of functions...


The question as usual is, is the (at least as I see it) better
readability worth a little performance drop?

Also, the functions that are factored out could still be inlined by the
compiler (If we continue the use of the current switch-statement). AFAIK
some compilers already do if a function is only used once.

I just tend to prefer readability over speed, unless it's a REALLY
performance critical part. The expansion-language IS a central part of
exim, but does it need to "run like greased lightning"?

Nico