Re: udp sockets with python

2010-11-11 Thread r0g
On 11/11/10 16:03, Jean-Paul Calderone wrote: On Nov 10, 9:23 pm, Tim Roberts wrote: Mag Gam wrote: I am measuring the round trip time using tcpdump. The C version is giving me around 80 microseconds (average) and the python is giving me close to 300 microseconds (average). If you need the

Re: udp sockets with python

2010-11-11 Thread Jean-Paul Calderone
On Nov 10, 9:23 pm, Tim Roberts wrote: > Mag Gam wrote: > > >I am measuring the round trip time using tcpdump. The C version is > >giving me around 80 microseconds (average) and the python is giving me > >close to 300 microseconds (average). > > If you need the performance of a compiled language,

Re: udp sockets with python

2010-11-10 Thread Tim Roberts
Mag Gam wrote: > >I am measuring the round trip time using tcpdump. The C version is >giving me around 80 microseconds (average) and the python is giving me >close to 300 microseconds (average). If you need the performance of a compiled language, then it's probably not appropriate to use an inter

Re: udp sockets with python

2010-11-09 Thread Jean-Paul Calderone
On Nov 9, 5:20 am, Mag Gam wrote: > Hello, > > When measuring round trip time for the UDP echo client/server the C > version is much faster. I was wondering if there is anything I can do > to speed up. > > My current code for client looks like this > > sock=socket(AF_INET,SOCK_DGRAM) > for x i

udp sockets with python

2010-11-09 Thread Mag Gam
Hello, When measuring round trip time for the UDP echo client/server the C version is much faster. I was wondering if there is anything I can do to speed up. My current code for client looks like this sock=socket(AF_INET,SOCK_DGRAM) for x in range (1000): sock.sendto("foo",(server,port))