[Twisted-Python] transport.write performance.

zipxing zipxing at hotmail.com
Mon Aug 5 05:31:51 MDT 2013


cpython+ujson   6s
cpython+cjson   9s
pypy+json       30s

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


More information about the Twisted-Python mailing list