[pypy-dev] PyPy threads

2018-04-08 Thread Rene Nejsum
I have been running some test on PyPy3 1) hope someone can confirm/explain this: If PyPy is running a tight loop in a thread, other threads will not be run/scheduled? The example: I am running factorial(20) in a thread: 2) class MathActor(Actor): def factorial(self, n):

Re: [pypy-dev] Best way to inline a primitive array in RPython?

2018-10-30 Thread Rene Nejsum
Hi Timothy/ The code below is kind of a C-trick (or hack) based on the knowledge of how the C-compiler lays out structs in memory. In your example it would be: struct layout +--+ | a +--+ | b +--+ | _data[0] +--+ Adding the +64, gives you 64 extra bytes (64/4) = 16 int's if