2 ms·
C and Java apps with high contention don't scale well onto multiple cores, either. The key to speed is to not share state, which Python can do fine. It's call
by jrockway 16y ago
C and Java apps with high contention don't scale well onto multiple cores, either.
The key to speed is to not share state, which Python can do fine. It's called fork.
- cdavid 16y agoSometimes you cannot easily not share state. The fact that you can use multiple processes to scale is not an interesting statement when comparing python to other languages because it is true for every language out there. I think the GIL has made people in the python community too defensive: the GIL does not prevent from building scalable architectures in many cases, but it still sucks, and it would be better without. That's a limitation (and a tradeoff because it made development and integration with C easier). And there are scalable architectures based on threads (example: http://www.mailinator.com/tymaPaulMultithreaded.pdf http://www.mailinator.com/tymaPaulMultithreaded.pdf) - "thread suck" has became a meme which slightly bothers me in general. Not a panacea, but a good solution when applicable.
- rtaycher 16y agoI thought the key was not managing mutable state. Sharing lots of immutable data can probably shave a lot of performance over ipc.