CVS update: samba/source/lib

Martin Pool mbp at samba.org
Tue Mar 18 18:33:47 EST 2003


On 18 Mar 2003, mbp at samba.org wrote:

> First of all, do a char-by-char walk through both buffers until we get
> to a non-ascii character, or a difference between the strings.  This
> prefix can be directly compared without needing to call into iconv.
> This should be much faster for strings that are either all ascii, or
> differ near the start.

Wow. 

I was just testing this under Valgrind (equiv to, say, a 50MHz CPU)
and a simple strcasecmp takes a noticeable time with the old code, and
less than a second with the new one.  This should be a big win.

-- 
Martin 


More information about the samba-cvs mailing list