tjson.py
--------------------------------------------------------------------------
import json #for pypy
#import ujson as json #for python
tdic = {"aaa":1, "bbb":2, "ccc":3, "ddd":['1','2','3','4','abcdefghijk'],
"eee":{"aaaa":1, "bbbb":2, "cccc":[1,2,3,4,5,'aaa']}}
for x in xrange(1000000):
a = json.dumps(tdic)
b = json.loads(a)
On my computer, 1M dumps&loads, using 6s with cpython+ultrajson
30s with pypy+json
________________________________
> From: [email protected]
> Date: Thu, 1 Aug 2013 09:46:54 -0700
> To: [email protected]
> Subject: Re: [Twisted-Python] transport.write performance.
>
>
> On Aug 1, 2013, at 1:49 AM, zipxing
> <[email protected]<mailto:[email protected]>> wrote:
>
> pypy+builtin_json performance < cpython+ultrajson
>
> Do you have a reference to a benchmark confirming this? I'm curious
> about it.
>
> -glyph
>
>
> _______________________________________________ Twisted-Python mailing
> list [email protected]
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
_______________________________________________
Twisted-Python mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python