Oh, about the un-necessary loops thing. I was once hired by a PhD to build a software development department to convert his “academic matlab code” into an actual commercial application. One of my programmers was another PhD, and he successfully translated the matlab into C++ and it did run faster, and he parallelized it successfully (the latest hotness in 2005) but was still the slowest part of our whole operation. So, we did an old-fashioned code review and found an un-necessary loop, unwound that, got the exact same answers 100x faster. Apparently the PhDs were loop-slop blind, one had missed it for years and the other had been working on the translation/optimization/parallelization for months without seeing it.
Oh, about the un-necessary loops thing. I was once hired by a PhD to build a software development department to convert his “academic matlab code” into an actual commercial application. One of my programmers was another PhD, and he successfully translated the matlab into C++ and it did run faster, and he parallelized it successfully (the latest hotness in 2005) but was still the slowest part of our whole operation. So, we did an old-fashioned code review and found an un-necessary loop, unwound that, got the exact same answers 100x faster. Apparently the PhDs were loop-slop blind, one had missed it for years and the other had been working on the translation/optimization/parallelization for months without seeing it.