Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6370 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97485 invoked by uid 1010); 12 Dec 2003 19:58:03 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 97459 invoked from network); 12 Dec 2003 19:58:02 -0000 Received: from unknown (HELO asuka.nerv) (24.112.18.98) by pb1.pair.com with SMTP; 12 Dec 2003 19:58:02 -0000 Received: (qmail 4409 invoked from network); 12 Dec 2003 14:53:15 -0000 Received: from rei.nerv (HELO dummy.com) (rei@192.168.1.1) by asuka.nerv with SMTP; 12 Dec 2003 14:53:15 -0000 Reply-To: ilia@prohost.org Organization: Prohost.org To: Moriyoshi Koizumi , PHP Internals Date: Fri, 12 Dec 2003 15:09:19 -0500 User-Agent: KMail/1.5.4 References: <25BBBBC2-2CD2-11D8-8FCC-000A95CE0C62@at.wakwak.com> <200312121442.54406.ilia@prohost.org> <0E6C8F5C-2CDB-11D8-9F07-000A95CE0C62@at.wakwak.com> In-Reply-To: <0E6C8F5C-2CDB-11D8-9F07-000A95CE0C62@at.wakwak.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200312121509.19291.ilia@prohost.org> Subject: Re: [PHP-DEV] Re: Regarding the latest patch on fgetcsv() (stable branch) From: ilia@prohost.org (Ilia Alshanetsky) On December 12, 2003 02:40 pm, Moriyoshi Koizumi wrote: > I don't know why you're mentioning this at this time, > but I can say it is a sort of necessary evil :) Because the HEAD > version is capable of handling various encodings, and > less intricate IMO. Rather, I was surprised about that result, > it's only 2.5 times slower :) I mentioning this now because we are considering changes to the function in the development branch, which is a fine time to resolve any deficiencies. The added functionality, which if I understand correctly is support for multibyte delimeters and enclosures is great. But it hardly explains a significant performance disparity I am seeing. I believe much of the problem can be solved by moving from manual string iteration to one using C library functions such as memchr(). When parsing non-multibyte text there shouldn't be more then 10-15% performance loss. I should mention that benchmarks were made using time utility, so advantages offered by PHP 5's speedups were discounted. Had they been considered the speed loss would've been 300% or more. Ilia