Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was hoping that Python threads split across processors, but it seems that they don't. Is there a language that does it "automagically" without having to explicitly code it?


Have a look at Erlang. Actually, have a look at functional languages in general as being (mostly) side effect free they often have primitives for parallel processing.

Another pretty exciting language you might to look at is F# - presently running under Mono on my macbook.

Finally, if you love your python (who doesn't? ;)) - see http://www.parallelpython.com/ for some interesting work.


No, the standard Python interpreter kind of sucks at this. You might want to look at Stackless Python though, it has all sorts of neat concurrency primitives. http://www.stackless.com


Stackless is great, but it doesn't help much with multiple processors.


See if the processing package is useful to you: http://pypi.python.org/pypi/processing


Your OS process scheduler should do it to some degree at runtime, but beyond that there is not a lot that can be achieved without explicitly handling synchronization and locking of shared resources. I know there are some startups working on parallel processing optimizations though, so there could be some new developments in the future. Google has been acquiring a few of these startups recently..


I love python and use it for many of my prototyping needs but if you really need that extra juice from your extra processors you are probably using the wrong language for the problem.

From my experience average increase in speed gained from porting to C/C++ (even without using multi processors) is about x60-x100.


unless your application is very unusual, you could've just ported your < 10 bottlenecks and made the same gain. (and x60? right..)


> I was hoping that Python threads split across processors, but it seems that they don't.

Understanding concurrency in Python: They're called process-ors, not thread-ors... ;-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: