[pypy-dev] Don't release GIL in jit_libffi?

Armin Rigo arigo at tunes.org
Tue Aug 18 21:38:55 CEST 2015


Hi Tim,

On 17 August 2015 at 22:09, Maciej Fijalkowski <fijall at gmail.com> wrote:
> On Mon, Aug 17, 2015 at 9:29 PM, Timothy Baldridge <tbaldridge at gmail.com> wrote:
>> My calls into C are pretty fast in my custom RPython VM, but jit_libffi is
>> trying to release the GIL on every single call to a FFI function. Is there a
>> way to disable this if I know that a function call is going to be super
>> fast?
>
> not easily :-( would be cool if such an option exists

Additionally, look at the kind of machine code emitted.  It is not as
fast as theoretically possible if we didn't release the GIL at all,
but it's still much faster than calling a lock release and reacquire
function.


A bientôt,

Armin.


More information about the pypy-dev mailing list