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: gl...@twistedmatrix.com > Date: Thu, 1 Aug 2013 09:46:54 -0700 > To: twisted-python@twistedmatrix.com > Subject: Re: [Twisted-Python] transport.write performance. > > > On Aug 1, 2013, at 1:49 AM, zipxing > <zipx...@hotmail.com<mailto:zipx...@hotmail.com>> 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 Twisted-Python@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python > _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python