Re: [exim-dev] Speeding up spool_in.c a bit

Top Page
Delete this message
Reply to this message
Author: Nico Erfurth
Date:  
To: exim-dev
Subject: Re: [exim-dev] Speeding up spool_in.c a bit
Philip Hazel wrote:

>> the code a bit to fit the scheme. On my system this brings down the string
>> compares in this section for a usual message from 80-100 to 12-15.
>
> 12-15 what? Microseconds? Does this significantly affect the amount of


Number of calls on Ustrncmp (I didn't test it for Ustrcmp, as I didn't
recognize the usage of it first).

> processing needed to handle a message. I'm afraid I'm a bit skeptical
> that is will be significant, but I am not always good at guessing these
> things. (And remember that Exim is I/O limited; cpu usage isn't usually
> an issue.)


With all the features added over the time, CPU becomes an issue more and
more. Especially with spam and virus-scanning. But yes, IO should still
be the bigger problem. I would be interested in a real benchmark here.

> Aside: what has happened, of course, is that the number of things stored
> on the spool has increased a lot since I first wrote that code. If we
> are going to optimize it, maybe a binary-chop search on an ordered list
> would be faster still?


Just a guess, but I don't think it will be much faster, especially
because the options are of different types, so you need some special
treatment anyway.

> Eh? The difference between Ustrcmp and Ustrncmp has nothing to do with
> upper/lower case! It should all be in lower case.


Uuhh, sorry I've got confused here. :) I'm getting a bit rusty in my old
days. Mea maxima culpa.


Nico