Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77556 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63845 invoked from network); 23 Sep 2014 21:55:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Sep 2014 21:55:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.50 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.50 mail-wg0-f50.google.com Received: from [74.125.82.50] ([74.125.82.50:52973] helo=mail-wg0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AF/60-58738-B6CE1245 for ; Tue, 23 Sep 2014 17:55:56 -0400 Received: by mail-wg0-f50.google.com with SMTP id l18so4307684wgh.33 for ; Tue, 23 Sep 2014 14:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type:subject:from:date:to :message-id; bh=vtDzwyEQk7YYSIR9WZp48sIZRtokeTmcRMp2jViOwsM=; b=jYuPkGXcpPWCR42KfysgmFVqGvM1dH01poh0HqqxlCu33GnqyjUc401orI2q2rfLIg 0Snw3F1y6KmTKIyJcvw/GlbRFY3R15GY2Z6MDtgLzehgNJk8eGh7P2EYQgkQFYibFrh6 AxIJjsJQRT3tR3M0c6Lp5TPG5VZoy6P0dmQQQUrvyh3C9AJJjz9mkk9Acq4V/GteSMB7 Xa9XpDWPuhymCNKv6YNoPU2fNJ9HjY/AwgDy/+wlfc1uW4YJaPtV+JXXaAnTSJd04wu3 z02nCIXaLXk58S0p3g3izZUB8Uauy9C0KaKyYCHobUjpMaTRgxlF+l3TIpbhNl9NgnOR sytA== X-Received: by 10.194.204.232 with SMTP id lb8mr3224821wjc.0.1411509352585; Tue, 23 Sep 2014 14:55:52 -0700 (PDT) Received: from [192.168.0.3] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by mx.google.com with ESMTPSA id pi8sm3681162wic.17.2014.09.23.14.55.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Sep 2014 14:55:51 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Date: Tue, 23 Sep 2014 22:54:48 +0100 To: PHP internals Message-ID: Subject: Re: [PHP-DEV] Improve PHP 7 serialization From: rowan.collins@gmail.com (Rowan Collins) On 23 September 2014 12:17:35 GMT+01:00, Park Framework wrote: >Performance testing, Msgpack VS Igbinary > >igbinary: -20% slower, data size ~5% > As with any benchmark, the details of the test are rather important. Firstly, some data structures may be better handled than others, or be targeted for extra optimization, making some scenarios favour one method or the other. Some care needs to be taken in simulating one or more realistic use-cases. Secondly, speed to serialize and speed to unserialize are separate measures: igbinary openly admits that it is best used for things like caching, where reading occurs more often than writing, as it is often slower than text-based methods at write-time, but faster at read-time. Thirdly, the algorithms may have optional features which trade speed for space, or affect the above two points. For instance, igbinary's string interning, or the choice of structure used for objects in a PHP msgpack implementation. All that taken into account, it's unlikely that any one format is better in all situations, and in some cases the existing text-based format may even have measurable advantages. Which points again to the idea of making more algorithms available as bundled extensions, and as session serialization methods, but not changing the meaning of existing functions. -- Rowan Collins [IMSoP]