httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: svn commit: r329849 - in /httpd/httpd/trunk: CHANGES modules/proxy/proxy_util.c
Date Tue, 01 Nov 2005 13:58:18 GMT
Ruediger Pluem wrote:
> 
> On 11/01/2005 02:27 PM, Jim Jagielski wrote:
> > Since this happens for each request, doing a string copy seems
> > wasteful to me; it's extra overhead that is avoided with the
> > current impl. Instead, we have an extra assignment and
> > check, which is less expensive.
> 
> This is fine. My other approach was born of the idea that we can
> replace strncasecmp with strncmp in the loop. Just for interest:
> Any idea regarding the difference in performance between both?
> 

Certainly strncmp is quicker, since strncasecmp does an auto
tolower on each char. But we are doing that in both cases,
whether we're tolower'ing the string first, or whether we're
doing it at comparison time. So we're not saving anything
really there.

-- 
=======================================================================
 Jim Jagielski   [|]   jim@jaguNET.com   [|]   http://www.jaguNET.com/
           "If you can dodge a wrench, you can dodge a ball."

Mime
View raw message