On 23 September 2014 12:17:35 GMT+01:00, Park Framework <park.framew...@gmail.com> 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] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php