Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>We frequently battle issues with the Python GIL at DeepMind. In many of our applications, we would like to run on the order of 50-100 threads per process. However, we often see that even with fewer than 10 threads the GIL becomes the bottleneck. To work around this problem, we sometimes use subprocesses, but in many cases the inter-process communication becomes too big of an overhead. To deal with the GIL, we usually end up translating large parts of our Python codebase into C++. This is undesirable because it makes the code less accessible to researchers.


Maybe they should look in to translating parts of their code base to Shedskin Python. It compiles (a subset of) Python to C++.


How's it different from Cython, which compiles a subset of Python to C or C++?


Shedskin has stricter typing, and about 10-100 times performance vs Cython.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: