Re:Meta pledges Three-Year sponsorship for Python if GIL rem...
by sanxiyn on Saturday July 08, 2023 @02:50PM
(#36647507)
Have you tried it? You are right in general, but even if you don't write anything in Python, CPython runtime constantly writes to heap, so everything is copied. You need specific support from CPython runtime to exploit copy-on-write.
Re:Meta pledges Three-Year sponsorship for Python if GIL rem...
by tga_d on Saturday July 08, 2023 @07:44PM
(#36649883)
I guess when GP said "heavy ... C extensions" I was thinking code pages from libraries and structures managed by C, yes python objects will require additional consideration.
This is documented: https://docs.python.org/3/library/gc.html#gc.freeze
For details, see "Copy-on-write friendly Python garbage collection" by Instagram Engineering: https://instagram-engineering.com/copy-on-write-friendly-pyt...