-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Le 13/10/2014 22:15, Jakub Zelenka a écrit : > 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.
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 > > Jakub > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlSH63wACgkQYUppBSnxahjv2gCfQZLjrjrfjKuFk69vanf7IJbl K+0An2/cikV5DqTeyPGtlUxX6uScZewl =0VlE -----END PGP SIGNATURE----- -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php