[Python-Dev] json decoder speedups, any time left for 2.6?
bob at redivi.com
Sat Sep 27 19:50:31 CEST 2008
simplejson 2.0.0 is now released which is about as optimized as I can
be bothered to make it. It's about 4x faster than cPickle for encoding
and just a little slower and decoding, which is good enough for now ;)
The pure Python source is much uglier now (to avoid global lookups,
etc.), but also several times faster than it was.
One of the optimizations I made probably isn't good for Py3k, it will
return ASCII strings as str objects instead of converting to unicode,
but that shouldn't be too much work to port (though I haven't looked
at the current _json.c port for Py3k).
I also converted over to using Sphinx documentation, which was nice
because I was able to just re-use the docs that were already in Python
trunk after changing the module name around.
All of the work should be easy to merge back into trunk so I'll try
and take care of that quickly after Python 2.6 is released.
On Wed, Sep 24, 2008 at 9:02 AM, Bob Ippolito <bob at redivi.com> wrote:
> The _speedups module is optional.
> On Wed, Sep 24, 2008 at 8:42 AM, Alex Martelli <aleaxit at gmail.com> wrote:
>> Meanwhile, can you please release (wherever you normally release
>> things;-) the pure-Python version as well? I'd like to play around
>> with it in Google App Engine opensource sandboxes (e.g., cfr.
>> gae-json-rest -- I'll be delighted to add you to that project if you
>> want of course;-) and that requires Python 2.5 and only pure-Python
>> add-ons... thanks!
>> On Wed, Sep 24, 2008 at 8:08 AM, Bob Ippolito <bob at redivi.com> wrote:
>>> On Wed, Sep 24, 2008 at 6:14 AM, Barry Warsaw <barry at python.org> wrote:
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA1
>>>> On Sep 24, 2008, at 5:47 AM, Nick Coghlan wrote:
>>>>> Bob Ippolito wrote:
>>>>>> How much time do I
>>>>>> have left to get this into Python 2.6?
>>>>> Zero I'm afraid - with rc1 out, it's release blocker bugs only. Anything
>>>>> which can be deferred to the 2.6.1 release without causing any major
>>>>> harm is definitely out - and while a 2x speedup is very nice, it isn't
>>>>> something to be squeezing in post-rc1.
>>>>> Still, that should make for a nice incremental improvement when 2.6.1
>>>>> rolls around.
>>>> I concur.
>>> Ok, no problem. The speedup is about 3x now on the trunk ;) I think
>>> that further optimization will require some more C hacking, but 2.6.1
>>> should give me plenty of time to get around to some of that.
>>> Python-Dev mailing list
>>> Python-Dev at python.org
>>> Unsubscribe: http://mail.python.org/mailman/options/python-dev/aleaxit%40gmail.com
More information about the Python-Dev