[Python-Dev] Python 2.3b1 has 20% slower networking?

Anthony Baxter Anthony Baxter <anthony@interlink.com.au>
Wed, 30 Apr 2003 17:29:08 +1000


>>> Itamar Shtull-Trauring wrote
> In real programs the speed drop would probably be much less pronounced,
> although I bet this slows down e.g. Anthony Baxter's portforwarder quite
> a bit. If Python 2.3 is released without fixing this Twisted will
> probably monkeypatch the socket module so that we can get full
> performance, since we have our own (unavoidable) layers of Python
> indirection :)

For whatever reason, it actually doesn't seem to matter. 
Python2.2 seems to clock in about 10% slower (in throughput
and connections/second) than the same code running under 2.3a1.
Upgrading to current-CVS, I see almost no difference between
2.3a1 and current-CVS (maybe 5% improvement). (FWIW, python2.1
is almost 25% slower than current-cvs!)

The code in question is pythondirector, a pure-python TCP 
loadbalancer, http://pythondirector.sf.net/. In this case all the 
above were run with Twisted 1.0.3. All tests were run on my laptop
via the loopback interface.

Anthony
-- 
Anthony Baxter     <anthony@interlink.com.au>   
It's never too late to have a happy childhood.