[pypy-dev] slow-ish multithreaded primitives

Dima Tisnek dimaqq at gmail.com
Fri Feb 21 15:43:44 CET 2014


Hey all, I wrote some threaded code and ran it under different version
of python, and unexpectedly high overhead is observed:

cpython 2.6.8. cpython 2.7.6, pypy 2.2.1: 14~53ms
cpython 3.3.4: pypy 2.1.0 beta py3 mode: <1ms

is someone here interested in getting to the bottom of it?
or getting pypy py2 mode in line with py3 mode?

the set up:
1 lock
2 threads
each thread has own condition variable
both condition variables share the lock mentioned above.
threads wake each other up in turn.
arch x86_64, linux 3.12.9, up to date libc/rt/pthread

sorry I don't have code handy, it's part of a larger project, but if
someone's interested, please reply and I'll hack up a short test case.

thanks,
d.


More information about the pypy-dev mailing list