[pypy-dev] ctypes - PyPy 1.8 slower than Python 2.6.5

Maciej Fijalkowski fijall at gmail.com
Mon Feb 13 19:44:07 CET 2012


On Mon, Feb 13, 2012 at 4:29 PM, Stefan Behnel <stefan_ml at behnel.de> wrote:
> Sébastien Volle, 13.02.2012 13:33:
>> My team is working on a project of fast packet sniffers and I'm comparing
>> performance between different languages.
>> So, we came up with a simple ARP sniffer that I ported to Python using
>> ctypes.
>
> If performance is important to you, you may want to write the wrapper for
> Python in Cython instead (and maybe also parts of the filtering code, which
> I assume your program to be about).
>
> Stefan

Hi Stefan

I appreciate your willingness to advertise cython wherever it's
possible, but this is simply not on topic on the current thread.

Cython is not a panacea for all woes and it's actually slower than
pypy on most cases that don't involve calling C. It's also slower even
when you provide direct type annotations, so you have a pretty
reasonable usecase for pypy even in cases where calling C is a
problem. Also, we're going to attack those ctypes problems.

If you wish to respond to my mail, please put it into a post that has
a different title and not hijack all the discussions with cython.

Thank you,
fijal


More information about the pypy-dev mailing list