Hacker News new | ask | show | jobs
by kzrdude 1716 days ago
It turns out using numpy is enough for Python to parallelize this adequately using threads, see this code: https://news.ycombinator.com/item?id=28817357
1 comments

It's not the same algorithm: That code completes all 200 iterations unconditionally. For some parts of the input domain, the numpy speed-up is enough to compensate and make it faster anyway, but for other parts it will be slower.
Agree, even if it compensates by supplying a gradually shrinking compute mask, but not to all operations. But an effect is there, less populated chunks compute faster.