|
|
Subscribe / Log in / New account

GIL removal and the Faster CPython project

GIL removal and the Faster CPython project

Posted Aug 3, 2023 21:18 UTC (Thu) by bluss (guest, #47454)
In reply to: GIL removal and the Faster CPython project by roc
Parent article: GIL removal and the Faster CPython project

Interpreter or not, I'm not sure if that matters. C# comes to mind. It makes it easy to spawn new threads, it's a "safe" language, and it's very easy to modify hashmaps from multiple threads at once. And the result is both one's own state as well as the internal state of the collection can be corrupted.


to post comments

GIL removal and the Faster CPython project

Posted Aug 4, 2023 9:01 UTC (Fri) by zorro (subscriber, #45643) [Link]

In my example above, I was also thinking about C#. I love being able to convert my for/foreach loops into Parellel.For/ForEach with just a few lines of code and get an instant N x speedup. Of course, you need to ensure that the data you are feeding into your parallel loop is "embarrassingly partitionable", but this is true for many workloads.

I'm sure there is some task and thread management overhead under the hood when using this .NET feature, but it does not sound as heavyweight as a Python sub-interpreter (I could be wrong about that)


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds