News for hackers. Stuff that matters.
Re:Python stands to lose its GIL, and gain a lot of speed by jesboat on Sunday October 17, 2021 @01:19PM (#28898004)
The problem is (perhaps amusingly) with refcounting. As the processes run, they'll each be doing refcount operations on the same module/class/function/etc objects which causes the memory to be unshared.
Re:Python stands to lose its GIL, and gain a lot of speed by lazide on Sunday October 17, 2021 @02:02PM (#28898367)
Only where there is memory churn. If you’re in a tight processing loop (checksumming a file? Reading data in and computing something from it?) then the majority of objects are never referenced or dereferenced from the baseline.

Also, since the copy on write generally is memory page by memory page, even if you were doing a lot of that, if most of those ref counts are in a small number of pages, it’s not likely to really change much.

It would be good to get real numbers here of course. I couldn’t find anyone obviously complaining about obvious issues with it in Python after a cursory search though.

Re:Python stands to lose its GIL, and gain a lot of speed by byroot on Sunday October 17, 2021 @05:57PM (#28900162)
That was solved years ago by moving the refcounts into different pages: https://instagram-engineering.com/copy-on-write-friendly-pyt...