Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73481 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18411 invoked from network); 30 Mar 2014 18:17:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Mar 2014 18:17:59 -0000 Authentication-Results: pb1.pair.com header.from=me@rouvenwessling.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=me@rouvenwessling.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain rouvenwessling.de designates 5.35.242.46 as permitted sender) X-PHP-List-Original-Sender: me@rouvenwessling.de X-Host-Fingerprint: 5.35.242.46 rouvenwessling.de Linux 2.6 Received: from [5.35.242.46] ([5.35.242.46:47193] helo=lvps5-35-242-46.dedicated.hosteurope.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C1/00-18245-4DF58335 for ; Sun, 30 Mar 2014 13:17:58 -0500 Received: by lvps5-35-242-46.dedicated.hosteurope.de (Postfix, from userid 5001) id 3996F69F14E4; Sun, 30 Mar 2014 20:17:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lvps5-35-242-46.dedicated.hosteurope.de X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.1 Received: from rouvens-air-7.localdomain (xdsl-84-44-159-116.netcologne.de [84.44.159.116]) by lvps5-35-242-46.dedicated.hosteurope.de (Postfix) with ESMTPSA id DEEF269F04D1; Sun, 30 Mar 2014 20:17:51 +0200 (CEST) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) In-Reply-To: Date: Sun, 30 Mar 2014 20:17:42 +0200 Cc: PHP internals list Content-Transfer-Encoding: quoted-printable Message-ID: <7B4E1A3B-A762-4FE6-A9FB-7CE9898B495C@rouvenwessling.de> References: To: Jakub Zelenka X-Mailer: Apple Mail (2.1874) Subject: Re: [PHP-DEV] New JSON parser From: me@rouvenwessling.de (=?iso-8859-1?Q?Rouven_We=DFling?=) On 13.03.2014, at 20:48, Jakub Zelenka wrote: > Hi, >=20 > I have create a new JSON parser using conditional re2c and pure pull = Bison > parser. It's a native UTF-8 parser licensed under PHP license (it can = be > used for Evil though :) ). The extension is available at >=20 > https://github.com/bukka/php-jsond >=20 > The encoder is taken from the current ext/json but the decoder has = been > completely rewritten. While looking at this code I noticed that the encoder also does a UTF-8 = -> UTF-16 conversion that can be avoided. I've written a patch to avoid = doing so: https://github.com/php/php-src/pull/636=20 The performance improvement is not as awesome as jsond, just 15-30%. = Interestingly it also makes decoding slightly faster. In the process I've also spotted some unused code lying around, removal = is here: https://github.com/php/php-src/pull/637 Best regards Rouven=