Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79521 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91431 invoked from network); 10 Dec 2014 06:43:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Dec 2014 06:43:14 -0000 Authentication-Results: pb1.pair.com header.from=remi@fedoraproject.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=remi@fedoraproject.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fedoraproject.org from 217.70.183.197 cause and error) X-PHP-List-Original-Sender: remi@fedoraproject.org X-Host-Fingerprint: 217.70.183.197 relay5-d.mail.gandi.net Linux 2.6 Received: from [217.70.183.197] ([217.70.183.197:54625] helo=relay5-d.mail.gandi.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C3/BB-09154-08BE7845 for ; Wed, 10 Dec 2014 01:43:13 -0500 Received: from mfilter32-d.gandi.net (mfilter32-d.gandi.net [217.70.178.163]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id 5436441C062 for ; Wed, 10 Dec 2014 07:43:10 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter32-d.gandi.net Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by mfilter32-d.gandi.net (mfilter32-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 10I1c3QXjbpR for ; Wed, 10 Dec 2014 07:43:08 +0100 (CET) X-Originating-IP: 82.241.130.121 Received: from schrodingerscat.famillecollet.com (pom51-2-82-241-130-121.fbx.proxad.net [82.241.130.121]) (Authenticated sender: contact@ll-experts.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id C91BC41C05A for ; Wed, 10 Dec 2014 07:43:08 +0100 (CET) Message-ID: <5487EB7C.7040708@fedoraproject.org> Date: Wed, 10 Dec 2014 07:43:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: PHP Internals References: <543A1CB9.9040205@fedoraproject.org> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] PHP 7 and json From: remi@fedoraproject.org (Remi Collet) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Le 13/10/2014 22:15, Jakub Zelenka a =C3=A9crit : > Hi, >=20 > We have 2 alternative extensions >>=20 >> - - jsonc the older one, probably not perfect, but used in a lot >> of downstream distributions >>=20 >> - - jsond the recent one >>=20 >>=20 >> I think it is time to switch ext/json to another implementation >> and so make PHP really "free" again. >>=20 >=20 > I think that we should have a proper benchmarks of both > alternatives before we make that decision. I have been already > working on it for some time. I'm almost done with a generator that > generates json files based on defined templates. I need to add more > templates and experiment with it a bit more. The decoders/encoders > behaves differently for different json instances. It's very > important to test as many instances as possible to minimize chance > of any regression. I think that I'll be able to provide some > numbers in the next few months. I would like to benchmark current > json, jsond as well as jsonc. The main issue is the "non-free" decoder. Of course perf can be considered as an issue (I think minor). jsonc have bad perf, but is free. If jsond have nearly same perf than old one, it's enough. > Just a quick update on jsond. The decoder is mostly done. So, please go on. > I have been recently working on optimization for the encoder. I > already have over 30% speed improvement in encoding for string > based arrays/objects like $_SERVER. It's generally much faster now > but there is still a big room for other impromevents. I also > experiment with a new buffer (replacement for smart_str in json > encoder). It needs lots of optimization but it already gives better > numbers for some cases. However it also gives worse numbers for > some other cases like processing small integers so I need to play > with it a bit more. As I said before I need a better set of > benchmarks to be sure that it works fine for a big number of json > instances. Current encoder is not an issue. Perf. can be manage later. And I don't think we should use another string management for json encoder, so if improvment is possible, should go in smart_str. Remi. > Cheers >=20 > Jakub >=20 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlSH63wACgkQYUppBSnxahjv2gCfQZLjrjrfjKuFk69vanf7IJbl K+0An2/cikV5DqTeyPGtlUxX6uScZewl =3D0VlE -----END PGP SIGNATURE-----