News for hackers. Stuff that matters.
Re:Parallelising Python with Threading and Multiprocessing by halayli on Saturday May 03, 2014 @01:04PM (#7691465)
This example is not too realistic and just narrows it down to the case where a job can be divided into isolated tasks with no shared data/state.

Often times threads need to update shared dict/list etc... With multiprocessing this cannot be done. You can use a Queue for this but it's horribly inefficient.

Generally speaking if you need performance and Python is not meeting the requirements then you are better off using another language.

Re:Parallelising Python with Threading and Multiprocessing by shavenwarthog2 on Saturday May 03, 2014 @02:53PM (#7691948)
Multiprocessing supports "managed objects", shared across multiple processes -- example: http://johntellsall.blogspot.com/2014/05/code-multiprocessin...

I'm unsure of the performance ramifications vs using concurrent.futures

Re:Parallelising Python with Threading and Multiprocessing by shogunmike on Saturday May 03, 2014 @01:09PM (#7691497)
I agree, the scope of the article is somewhat specific to the "toy" example presented.

Generally I would use C++ or (gasp!) Fortran with either MPI or CUDA for these sorts of tasks if performance was the most critical factor.

I'm excited by the Julia language though!

Re:Parallelising Python with Threading and Multiprocessing by js2 on Saturday May 03, 2014 @02:08PM (#7691760)
It's py3 but there is a back port of it for py2 that works wonderfully. I've recently begun using it and will never look back to multiprocessing (on which it is built).
Re:Parallelising Python with Threading and Multiprocessing by andreasvc on Saturday May 03, 2014 @03:49PM (#7692133)
You probably meant to reply to the thread about concurrent.futures.
Re:Parallelising Python with Threading and Multiprocessing by pekk on Saturday May 03, 2014 @02:07PM (#7691751)
> With multiprocessing this cannot be done. You can use a Queue for this but it's horribly inefficient.

So document that this is not just a problem with some program you wrote, but multiprocessing itself.