Investigating pypy frame drop
pypy has spikes in time it takes occasionally when using cpyext, otherwise known as pauses. This is because it's deallocating lots of CPython objects all in one frame, rather than incrementally. This is likely to be addressed in a future release of pypy. Mainly it's a problem when creating and deleting lots of CPython objects (like pygame.Rect). Not pure python objects. To work around it for now, the src/rect.c has been changed to have a free list of python objects, so it doesn't alloc and dealloc them. Instead it maintains it's own list of rect PyObject pointers, and reuses them. This is done in PR #431 Use PYPY_GC_NURSERY=1m incminimark environment variables when running pypy. Below are timings of the default pygame, and default pypy (at time of writing). Then a benchmark showing the improvement with the rect freelist implemented in rect.c inside pygame. Then we also improve things by setting PYPY_GC_NURSERY=1m environment variable to change the ...