Re:Pyston v2.2: faster and open source
by sreeramb93 on Thursday May 06, 2021 @06:40AM
(#27061302)
is it GIL-free? Web servers are multi-core. Any fork of python should serve requests on all cores like golang and its scheduler does using goroutines.
[ Parent
| on HN ]
Re:Pyston v2.2: faster and open source
by globular-toast on Thursday May 06, 2021 @06:47AM
(#27061345)
You can easily do that by simply running N instances and distributing requests among them. No need for all the complication that would come with removing the GIL.
And pay in memory for that luxury: when using lots of complex libraries (like in ML) the Python process can eat quite a lot of RAM.
Since gc.freeze() got implemented (https://docs.python.org/3/library/gc.html#gc.freeze) having forked workers has much lower cost these days. As long as you can load your data pre-fork that is.
Wow, I missed its introduction. Nice. On a cursory glance Celery doesn't make use of it yet, unfortunately.
Re:Pyston v2.2: faster and open source
by globular-toast on Thursday May 06, 2021 @07:51AM
(#27061839)
Yes. Python is not without tradeoffs.