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: r1715938 - /httpd/httpd/trunk/modules/cache/cache_util.c
Date Tue, 24 Nov 2015 18:03:46 GMT

> On Nov 24, 2015, at 11:18 AM, Graham Leggett <minfrin@sharp.fm> wrote:
> 
> On 24 Nov 2015, at 6:15 PM, Yann Ylavic <ylavic.dev@gmail.com> wrote:
> 
>> Not sure:
>>   if (!strcmp(h, "max-age")
>>       || ap_cmpcasestr(h, "max-age"))
>> is likely to be a bit faster than a single ap_cmpcasestr() when it
>> matches, but much slower when it does not.
> 
> Yep, that’s the point.
> 
> The vast majority of comparisons are lowercase for tokens like this. Might as well test
that fast path first before testing the worst case scenario.
> 

Is there REALLY that much of a diff between

	if (ucharmap[*ps1] != ucharmap[*ps2]) {

and

	if (*ps1 != *ps2) {

to muddle up the code like that though??


Mime
View raw message