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   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
           "If you can dodge a wrench, you can dodge a ball."

Reply via email to