News for hackers. Stuff that matters.
Re:The multiprocessing module in Python by brianolson on Friday February 03, 2017 @02:44PM (#13562618)
If you need multi-core for performance, first you should rewrite in a compiled language instead of Python. Java/C/C++/Go/FORTRAN/whatever will run 10 to 20 times faster before even worrying about running multi-core.
Re:The multiprocessing module in Python by corysama on Friday February 03, 2017 @03:05PM (#13562806)
On a mid-range desktop PC, the horsepower breakdown is something like: 100% everything, 75% GPU, 25% all CPUs, 5% one CPU including SIMD, 1% a single CPU running scalar code.

I love Python. But, it's good to remember sometimes that it runs at about 1% efficiency compared to well-optimized C. So, you paid for a whole machine and you are utilizing 0.01%. That's fine for a lot of tasks; especially tasks that are 99% I/O-bound or tasks that are just coordinating big C libraries to do 99% of the work. Just good to remember sometimes...

Re:The multiprocessing module in Python by noobiemcfoob on Friday February 03, 2017 @04:17PM (#13563405)
Hedging around these statements is important, but far too often I see people convinced they are in the 1% of tasks that truly need top level performance. Which is to say, I often see people who are wrong.
Re:The multiprocessing module in Python by nine_k on Friday February 03, 2017 @03:20PM (#13562960)
It is mostly done already, if you consider numpy. But the top-layer glue code, which is Python, needs to allow it to tun in parallel, where it's not automatic.
Re:The multiprocessing module in Python by kirkdouglas on Friday February 03, 2017 @02:46PM (#13562636)
Python is compiled language.
Re:The multiprocessing module in Python by jMyles on Friday February 03, 2017 @06:18PM (#13564225)
Python can be compiled, interpreted, or translated into smoke signals and reconstituted on the other side of the valley. It is not per se any of these things.
Re:The multiprocessing module in Python by corysama on Friday February 03, 2017 @03:06PM (#13562826)
That is technically correct, but not useful for the conversation...
Re:The multiprocessing module in Python by jMyles on Friday February 03, 2017 @06:18PM (#13564217)
No it's not. That's like (and I know this has been said again and again) that "War and Peace" is a hardcover book. It's a non-sequitur.
Re:The multiprocessing module in Python by mixmastamyk on Friday February 03, 2017 @03:42PM (#13563124)
Sometimes you just need better performance, not necessarily blistering.
Re:The multiprocessing module in Python by mixmastamyk on Monday February 06, 2017 @05:34PM (#13584935)
Scalable, I meant to add.