[pypy-dev] pypy1.6 slow on string-heavy ops

Armin Rigo arigo at tunes.org
Wed Aug 24 14:58:37 CEST 2011


Hi,

On Tue, Aug 23, 2011 at 7:28 PM, Yury Selivanov <yselivanov.ml at gmail.com> wrote:
> If you read that Armin's email carefully, you notice that he talks about a low-level primitive called "stacklets", which have some limitations, but are not intended for a regular use.  Greenlets will be implemented on top of them.  So anything that was possible to do before will be supported in the new version.

Thanks, yes, indeed.  In fact the final solution, implemented now, has
one-shot continuations called "stacklets" at the C level, then a still
rather primitive notion called "continulets" exposed to Python, and
finally "greenlet.py", written as pure Python code on top of
continulets, implements the usual greenlets.  (I think that
continulets are a great primitive worth a thousand words --- or a
research article --- but that's another topic.)

Btw, I checked that this works nicely with the JIT.  In an example
with greenlets calling each other without doing anything themselves,
it gets easily twice as fast as CPython with "greenlet.c".


A bientôt,

Armin.


More information about the pypy-dev mailing list