Re:Why I Still Use Python for High Performance Scientific Co...
by emcq on Wednesday December 02, 2015 @12:28PM
(#10664342)
I've tried to do a test like this and the results surprised me. While the testing conditions weren't perfect, I tracked how much time it took to port Fortran code to C++, and how much time it took to write the C++/CUDA optimized version. I would have expected writing all the optimized CUDA kernels would add significant time to the project, but in reality it was something like 1.3x for a solution 15x faster.
I think as developers we often underestimate the amount of work we need to put into the non coding part of development for larger projects, like testing, debugging, optimization, and design. When these components become important then despite the local productivity gains of using rapid development languages like python or Julia, it would overall be a wash if you're writing the system from scratch in a language like C.
Re:Why I Still Use Python for High Performance Scientific Co...
by msellout on Thursday December 03, 2015 @01:23AM
(#10668086)
On the contrary, I pick Python to make the "testing, debugging, optimization, and design" faster.
Re:Why I Still Use Python for High Performance Scientific Co...
by pjc50 on Wednesday December 02, 2015 @04:36AM
(#10661916)
Absolutely. For this kind of one-shot scientific computing, the only way the C programmer can win is if the Python programmer is sitting on their hands for weeks waiting for their program to run.
Re:Why I Still Use Python for High Performance Scientific Co...
by JupiterMoon on Wednesday December 02, 2015 @07:59AM
(#10662638)
Unless (1) the relevant library happens to be written in C and there are no python bindings and the problem is simple OR (2) there is an existing solution which is 95% complete in C and one needs to write from scratch in python. I've never come across situation (1) with a new project. Situation (2) is quite common.
True. But this assumes that time is not a constraint.
I think you need to think of it this way (as a thought experiment): you start two programmers off, one in C and one in Python, both with a vague understanding of how to solve the problem and approximately the same skill level. Then after X hours, you stop both and see how far they've gotten.
I think the argument then is that you might find that the C programmer hasn't yet solved the problem, whereas the Python programmer might have a solution + a deeper understanding of where the slow parts are, and started optimizing those.
So in the end the C programmer may win, but perhaps it's not about winning in this sense but more about how fast you can get to a point where you can move on to the next thing.