Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26658 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51384 invoked by uid 1010); 17 Nov 2006 15:26:51 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 51369 invoked from network); 17 Nov 2006 15:26:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Nov 2006 15:26:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=php_lists@realplain.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php_lists@realplain.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain realplain.com from 209.142.136.132 cause and error) X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 209.142.136.132 msa2-mx.centurytel.net Linux 2.4/2.6 Received: from [209.142.136.132] ([209.142.136.132:54140] helo=msa2-mx.centurytel.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 72/21-37771-9B4DD554 for ; Fri, 17 Nov 2006 10:26:50 -0500 Received: from pc1 (d31-96.rt-bras.wnvl.centurytel.net [69.179.158.96]) by msa2-mx.centurytel.net (8.13.6/8.13.6) with SMTP id kAHFQZkP011166; Fri, 17 Nov 2006 09:26:38 -0600 Message-ID: <011e01c70a5c$c76f0800$0201a8c0@pc1> To: "php-dev" , "Antony Dovgal" Cc: "Andrei Zmievski" References: <455455D1.3020706@zend.com> <017f01c704b9$5e07f870$0201a8c0@pc1> <45546EDB.2020400@zend.com> <011b01c70721$ca0ec7f0$0201a8c0@pc1> <0e7bb4f7f12e57e899a6c4b26068b93e@gravitonic.com> <455CBA6C.4060801@zend.com> <455DCB94.6010708@zend.com> Date: Fri, 17 Nov 2006 09:26:37 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Subject: Re: [PHP-DEV] zend_u_strtod() 400% speed up From: php_lists@realplain.com ("Matt Wilmas") Hi Antony! Wow, lots of testing ya did there. :-) Nice. But, just wanted to mention that "Matt's patch" is the one I did back in Aug. Did you see my last message [1] the other day with a new version that only checks for ASCII chars, doesn't do conversion from Unicode, etc.? http://realplain.com/php/zend_u_strtod.c (Untested) BTW, I see ICU 3.6 is a lot faster on the "current" code (saw a hint about that in the changelog); though still not close to the manual methods, of course. [1] http://news.php.net/php.internals/26538 Matt ----- Original Message ----- From: "Antony Dovgal" Sent: Friday, November 17, 2006 > Okay, I got some test results. > First of all, both patches seem to be fine, they both fix several failed tests: > Zend/tests/zend_strtod.phpt > ext/standard/tests/array/range.phpt > ext/standard/tests/general_functions/001.phpt > ext/standard/tests/math/abs.phpt > ext/standard/tests/math/bug30069.phpt > > Now the test results (average time in seconds spent on running the test script): > ---------------------------------------------------------------- > Platform current | Matt | Tony > ---------------------------------------------------------------- > Linux intel64 (ICU 3.6, non-ZTS) 104.20 18.93 29.93 > Linux intel64 (ICU 3.6, ZTS) 106.38 19.78 31.97 > Linux i386 (ICU 3.6, non-ZTS) 809.21 25.49 59.78 > Linux i386 (ICU 3.6, ZTS) 708.43 30.22 59.90 > Linux i386 (ICU 3.4, non-ZTS) 526.71 22.39 36.96 > Linux i386 (ICU 3.4, ZTS) 435.27 26.20 37.87 > FreeBSD i386 (ICU 3.6, non-ZTS) -- 20.66 33.47 > ---------------------------------------------------------------- > (Yes, I'm too lazy to rebuild PHP on FreeBSD 4 times more, as the result is clear). > > So we got a clear winner here - the patch by Matt outperforms the patch of mine by ~30%. > > The patches: > http://tony2001.phpclub.net/dev/tmp/u_strtod.diff - my patch > http://tony2001.phpclub.net/dev/tmp/u_strtod1.diff - Matt's patch > > The test script used: > [...] > > -- > Wbr, > Antony Dovgal