[pypy-dev] Performance, json and standard library

Maciej Fijalkowski fijall at gmail.com
Sat Sep 24 14:47:33 CEST 2011


I would like to raise the topic of modifying standard library for
performance reasons in *some* places. I know the policy so far is to
avoid modifications as much as possible and in general I agree. For
example the changes justinpeel made to bz2 (or tarfile? please remind
me about details) were not good, since it seems equivalent changes can
be achieved by tweaking the JIT.

However, json comes to mind. The situation is as follows:

* json in stdlib is some old version of simplejson
* simplejson has been played with to improve the performance on top of pypy
* there are reports that relatively simple changes will improve
performance: https://bugs.pypy.org/issue868
* json in stdlib will *not* be updated for 2.7 series and even if it
gets updated for 3.x it'll be incompatible

So while I agree that ideally, JIT could handle whatever it has, but
maybe json is an example good enough to warrant changes. There are
people out there who would base migration to pypy on json performance
for example.

Any opinions?


More information about the pypy-dev mailing list