Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26456 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94012 invoked by uid 1010); 10 Nov 2006 10:35:07 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 93996 invoked from network); 10 Nov 2006 10:35:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Nov 2006 10:35:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=antony@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=antony@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: antony@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from [212.25.124.162] ([212.25.124.162:38637] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5A/21-16675-4D554554 for ; Fri, 10 Nov 2006 05:35:03 -0500 Received: (qmail 25792 invoked from network); 10 Nov 2006 10:33:33 -0000 Received: from internal.zend.office (HELO ?127.0.0.1?) (10.1.1.1) by internal.zend.office with SMTP; 10 Nov 2006 10:33:33 -0000 Message-ID: <455455D1.3020706@zend.com> Date: Fri, 10 Nov 2006 13:34:57 +0300 User-Agent: Thunderbird 1.5.0.7 (X11/20060909) MIME-Version: 1.0 To: php-dev CC: Dmitry Stogov , Andrei Zmievski Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Subject: zend_u_strtod() 400% speed up From: antony@zend.com (Antony Dovgal) Hello all. I would like to propose a replacement for current zend_u_strtod() implementation. The patch: http://tony2001.phpclub.net/dev/tmp/u_strtod.diff According to my tests, new implementation is faster in about 40 (forty) times. The simple script below takes ~1 sec to run with the patch and ~40 seconds without. The only question here is which locale to use for number parsing/formatting. I used "en_US_POSIX" and it doesn't seem to create any new problems, though I'd like to hear your comments. -- Wbr, Antony Dovgal