On Tue, Aug 18, 2015 at 9:38 PM, Armin Rigo <ar...@tunes.org> wrote: > Hi Tim, > > On 17 August 2015 at 22:09, Maciej Fijalkowski <fij...@gmail.com> wrote: >> On Mon, Aug 17, 2015 at 9:29 PM, Timothy Baldridge <tbaldri...@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.
Yes and no. The code *itself* is not that bad, but it also trashes all the caches in the JIT optimizer, because it has to assume that everything can be potentially invalidated. There are ways to addressing that separately, but the JIT CALL_RELEASE_GIL is not as fast as it could be _______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev