Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53971 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25929 invoked from network); 15 Jul 2011 16:52:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jul 2011 16:52:36 -0000 X-Host-Fingerprint: 217.114.211.68 unknown Date: Fri, 15 Jul 2011 12:52:35 -0400 Received: from [217.114.211.68] ([217.114.211.68:19775] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3D/90-17341-350702E4 for ; Fri, 15 Jul 2011 12:52:35 -0400 To: internals@lists.php.net User-Agent: slrn/0.9.9p1 (SunOS) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: X-Posted-By: 217.114.211.68 Subject: [RFC] Add grisu3 strtod algorithm From: dsp@php.net (David Soria Parra) Hi Internals, I want to propose the inclusion of Florian Loitschs (called grisu3) strtod algorithm. Essentially Florian found a new algorithm for string to double conversion and vice versa. According to micro benchmarks in PHP and experiences with the library in the haskell community, this can speed up heavy conversions like json_decode up to 20-30%. It is a backward compatible change as we will not change the underlying zend_strtod api. The proposed change is enabled with a flag and will be disabled by default. As no underlying API is affected and because it's disabled by default, I propose this change to be included in PHP 5.4. I'll finish the patch before alpha3. The RFC an be found here: https://wiki.php.net/rfc/grisu3-strtod - David