Python is slower by most standards. But it is not so slow, you noticed for most of the code. The time taken by this script is not spent by the Python interpreter, it was waiting for the completion of the I / O. Network I / O, though. You create a thousand connections and sniff each one a little, and you do it one connection at a time - it will take a lot of time, no matter what language you write it in.
delnan
source share