Hacker News new | ask | show | jobs
by fabioz 1032 days ago
Actually, you get the speed increase if using threads on python with numpy because numpy will release the GIL internally, so, operations using numpy will actually run in parallel (i.e.: c libraries can release the GIL and do get the performance benefits when using multiple processors -- although yes, when you get back to running python code that won't be parallel due to the GIL).
2 comments

My genuine deep love for numpy extends to them doing these things without me knowing anything about it.
That's something I worry about when reading about future Python releases without GIL.

Will people just throw more and more threads at unfathomably slow Python code to get somewhat fast results?