
Hello, I'm working on a feature for the attrs library. As part of that feature I need to wrap the member_descriptor descriptor from ordinary slot classes. In order to speed this up, I'm using Cython. I'm not really sure if this or the Cython mailing list is the right place to ask this, but since I've had better luck here in the past I'm posting this here first :) A quick reproducer: Ubuntu 17.04/amd64, make a PyPy 5.7.1 venv, pip install Cython, download https://gist.github.com/Tinche/678a2f97f656421ab65338ea678df354 and https://gist.github.com/Tinche/111ccd2f46c9ba303b8e441d2e0fcddb. Uncomment the last line in t.py to trigger the crash. This code seems to work on CPython (and it speeds up attribute access a lot there). I'm not even sure doing this on PyPy is worthwhile, but as long as it crashes I can't be sure :) I'll be the first to admit I don't have a lot of experience writing Cython or C, so maybe there's an amateur mistake in there. For example, I tried putting in a few Py_INCREFs to maybe stop PyPy from moving objects around but it doesn't seem to help. Thanks in advance: :)

Please file an issue on https://bitbucket.org/pypy/pypy/issues so this doesn't get lost, I will try to take a look. Note that you probably will not see any speed up since our c-to-rpython conversion layer is much slower than cpython. Matti On 21/04/17 11:05, Tin Tvrtković wrote:

Please file an issue on https://bitbucket.org/pypy/pypy/issues so this doesn't get lost, I will try to take a look. Note that you probably will not see any speed up since our c-to-rpython conversion layer is much slower than cpython. Matti On 21/04/17 11:05, Tin Tvrtković wrote:
participants (2)
-
Matti Picus
-
Tin Tvrtković