Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77938 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53077 invoked from network); 13 Oct 2014 20:15:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Oct 2014 20:15:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=jakub.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jakub.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.175 as permitted sender) X-PHP-List-Original-Sender: jakub.php@gmail.com X-Host-Fingerprint: 209.85.213.175 mail-ig0-f175.google.com Received: from [209.85.213.175] ([209.85.213.175:44904] helo=mail-ig0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 07/33-32407-5F23C345 for ; Mon, 13 Oct 2014 16:15:50 -0400 Received: by mail-ig0-f175.google.com with SMTP id uq10so11908182igb.2 for ; Mon, 13 Oct 2014 13:15:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=G5raFL0Hz0dbrSiYFkQvzvmANNI4S+2dXLguN1sWk9k=; b=Lgbc7di5L7bTtls/rlpZ9VvUnZnrHLCRqTe2KxgyLa056+6Orb967hhsIfG/jC+147 AK/TGBsNee5eiKMbPYOqMKuMuoFxO1myqDY6bf9sjoFY2aYa0VrtQ0mnAmxJnD0CvcQ3 CNOvc2RcVZrxidBW3vUiljXdQAABVOi/X2OeVaewOLz6H/zSf5q+3brH9PpwteIOHxsC U61adr1BOilDm5xodf3uE7mxIn8RVvmYG2CMYHy4DulI9R/9Vbsxg9P8VnFLnBMLRVIO PbizmT0FMqXWGPR791FZpqm5kj6q2H3FNa58gqswqnU4WerVfsoxY6lBSLx1G3ezNjE/ Plhw== MIME-Version: 1.0 X-Received: by 10.50.49.78 with SMTP id s14mr1825777ign.9.1413231347184; Mon, 13 Oct 2014 13:15:47 -0700 (PDT) Sender: jakub.php@gmail.com Received: by 10.107.11.162 with HTTP; Mon, 13 Oct 2014 13:15:47 -0700 (PDT) In-Reply-To: <543A1CB9.9040205@fedoraproject.org> References: <543A1CB9.9040205@fedoraproject.org> Date: Mon, 13 Oct 2014 21:15:47 +0100 X-Google-Sender-Auth: pAcV4TygIZ15Wmx1Rk7xRyZXsfM Message-ID: To: Remi Collet Cc: PHP internals list Content-Type: multipart/alternative; boundary=047d7bdc10ca6f3b440505539072 Subject: Re: [PHP-DEV] PHP 7 and json From: bukka@php.net (Jakub Zelenka) --047d7bdc10ca6f3b440505539072 Content-Type: text/plain; charset=UTF-8 Hi, We have 2 alternative extensions > > - - jsonc the older one, probably not perfect, but used in a lot of > downstream distributions > > - - jsond the recent one > > > I think it is time to switch ext/json to another implementation and so > make PHP really "free" again. > 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. Just a quick update on jsond. The decoder is mostly done. 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. Cheers Jakub --047d7bdc10ca6f3b440505539072--