perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <>
Subject Re: [Patch mp2] Case-insensitive PerlOptions
Date Mon, 10 Jan 2005 22:20:48 GMT
Joe Schaefer wrote:
> Stas Bekman <> writes:
> [...]
>>while it's fine for startup code, it'll affect
>>modperl_config_is_perl_option_enabled, that may be called at request
>>time == slowdown. 
> Are the option strings in German or something?  It can't
> be a measurable performance difference to downcase a dozen 
> or so chars, can it?

My simple benchmark with strcmp vs. strcasecmp show strcasecmp() to be
around 10% slower:

3073412300/s => strcasecmp()
3485295200/s => strcmp()

Overall, the slowdown is about .0000000000384 sec per call (avg).

>>And that change may affect other things added in the future.
> Hopefully they don't depend on the case then.  I really
> see this as reducing user complaints; after all, httpd's 
> "Options" are case-insensitive as well.

This patch came to be after trying to have the HTTPExpose option.
I, personally, almost always make the assumption that httpd.conf
directives are case-insensitive.

Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

View raw message