This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author socketpair
Recipients socketpair
Date 2013-06-29.21:25:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1372541158.63.0.507892499267.issue18329@psf.upfronthosting.co.za>
In-reply-to
Content
Results or running attached program:
$ python2.7 qwe.py 
TCP  mode, makefile method. 198807.2 lines per second (189.6 MB/s). Delay is 5.03 seconds
TCP  mode,   fdopen method. 1041666.7 lines per second (993.4 MB/s). Delay is 0.96 seconds
UNIX mode, makefile method. 2040816.3 lines per second (1946.3 MB/s). Delay is 0.49 seconds
UNIX mode,   fdopen method. 1923076.9 lines per second (1834.0 MB/s). Delay is 0.52 seconds

$ python3.2 qwe.py 
TCP  mode, makefile method. 275482.1 lines per second (262.7 MB/s). Delay is 3.63 seconds
TCP  mode,   fdopen method. 909090.9 lines per second (867.0 MB/s). Delay is 1.10 seconds
UNIX mode, makefile method. 323624.6 lines per second (308.6 MB/s). Delay is 3.09 seconds
UNIX mode,   fdopen method. 1694915.3 lines per second (1616.4 MB/s). Delay is 0.59 seconds

----------------------------------------------
1. in every case, socket.makefile() is MUCH slower than os.fdopen() when used as "for line in fileobject"
2. compare speeds between python 2.7 and python 3.2 in same operation. Especially, socketpair+makefile
3. Why not to return os.fdopen() for sockets when socket.makefile() called on unix systems?
History
Date User Action Args
2013-06-29 21:25:58socketpairsetrecipients: + socketpair
2013-06-29 21:25:58socketpairsetmessageid: <1372541158.63.0.507892499267.issue18329@psf.upfronthosting.co.za>
2013-06-29 21:25:58socketpairlinkissue18329 messages
2013-06-29 21:25:58socketpaircreate