Re: dbm .v. lsearch

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Tom Samplonius
Fecha:  
A: tron
Cc: glenn, ph10, exim-users
Asunto: Re: dbm .v. lsearch

On Mon, 10 Mar 1997 tron@??? wrote:

> >> I'm sure I remember reading in the exim manual that dbm searches are
> >> cached (although I can't find it now) so my gut feeling is that a dbm
> >> search will always be faster regardless.
> >
> >Only within one run of Exim. It has been hypothesized that you need more
> >than a file buffer's worth of list to make it worth using dbm, but I
> >don't actually know.
>
> The operating system does more than enough caching to eliminate any
> significance to the performance difference between dbm and a binary
> search except for aliases files in excess of perhaps 512K. There is
> a performance difference, of course, but it is dwarfed by the overall
> processing involved in mail delivery.


Except that lsearch is a linaear search, not a binary search. The
performance difference will become readily apparent long before your
alias file reaches 512KB. Especially, if frequently accessed keys are
on the bottom of an lsearch'ed database

> -- 
>     Ronald S. Karr
>     tron |-<=>-|    tron@???

>
>


Tom