[pypy-dev] Thinking about the GIL

Armin Rigo arigo at tunes.org
Fri Mar 25 11:41:16 CET 2011


On Fri, Mar 18, 2011 at 1:44 AM, hyarion at iinet.net.au
<hyarion at iinet.net.au> wrote:
> (...) Wrapping each bytecode in an STM
> transaction would give you an as-if-serial execution order, again with no guarantees
> about which order. You get transaction overheads instead of lock/unlock overheads,
> but some STM systems can be quite efficient for short transactions that rarely
> conflict.

Yes, I also thought about this as one of the solutions that would "fit
the model" of PyPy by not needing changes all over the place.
However, I am unsure that the performance of STM is good enough for
that application so far.  Maybe I'm wrong, but I fear (a priori, with
no precise experience) that it would be really too slow to wrap *all*
memory reads and writes with the STM machinery.

I would be interested in learning if I'm wrong, or if there are
hardware solutions around the corner ready to be tried.

A bientôt,


More information about the Pypy-dev mailing list