3 ms·
> The reason people use threads very heavily in (say) Java is that it is the way things are done effectively on that platform, because there isn't really anythi
by oconnore 15y ago
> The reason people use threads very heavily in (say) Java is that it is the way things are done effectively on that platform, because there isn't really anything better. It's not because it is globally the best way to do things in every language and condition.
No, the reason threads are used very heavily in Java (and elsewhere) is that we have hit the ceiling of single threaded performance in silicon based processors. If you want to scale, you add more processors. Right now, I can't write a shared address space, pure-Python, trivially parallel program that performs significantly [1] better on a 2011 8 core i7 than on a single core Pentium 4 from almost ten years ago.
That seems silly to me, but I understand that you can still build cool things with Python, and I'm not suggesting that you stop doing so. I am working with Python, too, and I love it. I was simply suggesting that Python is missing an opportunity to become a more powerful, more general purpose language.
[1] We do have to take into account some improvements in branch prediction, cache sizes, memory speeds, etc.