Message224737
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 |
|
Date |
User |
Action |
Args |
2014-08-04 15:44:02 | loewis | set | recipients:
+ loewis, gvanrossum, ncoghlan, pitrou, vstinner, neologix, serhiy.storchaka |
2014-08-04 15:44:02 | loewis | set | messageid: <1407167042.09.0.383245728648.issue22127@psf.upfronthosting.co.za> |
2014-08-04 15:44:02 | loewis | link | issue22127 messages |
2014-08-04 15:44:02 | loewis | create | |
|