[zeromq-dev] pyzmq ctypes

Daniel Holth dholth at gmail.com
Wed May 25 16:53:19 CEST 2011


On Wed, May 25, 2011 at 10:17 AM, Dirkjan Ochtman <dirkjan at ochtman.nl> wrote:
>
> On Wed, May 25, 2011 at 16:14, Daniel Holth <dholth at gmail.com> wrote:
> > By popular demand (one person asked) the "Release Early" edition of
> > pyzmq-ctypes is at https://bitbucket.org/dholth/pyzmqctypes
> >
> > Unlike the Cython version, this binding works in pypy. A file called _zmq.py
> > contains most of the goodies. It implements most of the low-level ZeroMQ API
> > and a tiny bit of the pyzmq wrapper. A serious contributor might want to
> > incorporate the pyzmq unit tests and hack until they run, or go in a
> > different direction by wraping libzapi.
>
> Nice. Have you done any performance testing on CPython's ctypes vs. pyzmq?
>
> Cheers,
>
> Dirkjan

I have this helpful graph. The vertical axis shows messages per second.

Performance of ZeroMQ bindings on pypy:

|   __
|   |  |
|   |  |
|   |  |
|   |  |
|   |  |
----|--|-------------------------- 0
pyzmq-ctypes   pyzmq

The pyzmq-ctypes binding has nothing to do with performance in
CPython, sorry. pypy on the other hand can actually generate halfway
decent ctypes code. You might see better overall performance if pypy's
JIT speeds up the rest of your code enough to make up for the slower
ZeroMQ bindings.



More information about the zeromq-dev mailing list