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 loewis
Recipients gvanrossum, loewis, ncoghlan, neologix, pitrou, serhiy.storchaka, vstinner
Date 2014-08-04.15:44:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1407167042.09.0.383245728648.issue22127@psf.upfronthosting.co.za>
In-reply-to
Content
Please understand that Victor and I were asking you to pass a *unicode* object, with a *u* prefix. For me, the time more-than-doubles, on OSX, with the system python.

mvl:~ loewis$ /usr/bin/python -m timeit -s "import socket; s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)" "s.sendto(b'hello', ('127.0.0.1', 4242))"
100000 loops, best of 3: 8.15 usec per loop
mvl:~ loewis$ /usr/bin/python -m timeit -s "import socket; s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)" "s.sendto(b'hello', (u'127.0.0.1', 4242))"
10000 loops, best of 3: 19.5 usec per loop
mvl:~ loewis$ /usr/bin/python -V
Python 2.7.5
History
Date User Action Args
2014-08-04 15:44:02loewissetrecipients: + loewis, gvanrossum, ncoghlan, pitrou, vstinner, neologix, serhiy.storchaka
2014-08-04 15:44:02loewissetmessageid: <1407167042.09.0.383245728648.issue22127@psf.upfronthosting.co.za>
2014-08-04 15:44:02loewislinkissue22127 messages
2014-08-04 15:44:02loewiscreate