Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22390 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29857 invoked by uid 1010); 14 Mar 2006 05:56:38 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 29842 invoked from network); 14 Mar 2006 05:56:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Mar 2006 05:56:37 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:31389] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id A4/DB-55982-41B56144 for ; Tue, 14 Mar 2006 00:56:37 -0500 Received: (qmail 11218 invoked from network); 14 Mar 2006 05:56:31 -0000 Received: from localhost (HELO ANDI-NOTEBOOK.zend.com) (127.0.0.1) by localhost with SMTP; 14 Mar 2006 05:56:31 -0000 Message-ID: <7.0.1.0.2.20060313215601.014b16e0@zend.com> X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0 Date: Mon, 13 Mar 2006 21:56:40 -0800 To: Marcus Boerger ,Ron Korving Cc: internals@lists.php.net In-Reply-To: <1914614308.20060313222029@marcus-boerger.de> References: <4414F63F.5030406@lerdorf.com> <1914614308.20060313222029@marcus-boerger.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] Re: Calling performance geeks From: andi@zend.com (Andi Gutmans) This one isn't a good idea. I bet it won't affect overal performance but makes the code much less maintainable. The others look OK (just took a quick glance) At 01:20 PM 3/13/2006, Marcus Boerger wrote: > > ----- > > > In sapi/apache/mod_php5.c in the function php_apache_flag_handler_ex(), > > > the original: > > if (!strcasecmp(arg2, "On") || (arg2[0] == '1' && arg2[1] == '\0')) { > > bool_val[0] = '1'; > > } else { > > bool_val[0] = '0'; > > } > > > is over 5 times slower than: > > > if (((arg2[0] == 'O' || arg2[0] == 'o') && (arg2[1] == 'n' || arg2[1] == > > 'N') && (arg2[2] == '\0')) || (arg2[0] == '1' && arg2[1] == '\0')) { > > bool_val[0] = '1'; > > } else { > > bool_val[0] = '0'; > > } > > > -----