Slow performance compared to C++, ideas?

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Sun Jun 2 04:46:18 PDT 2013


On 06/02/2013 08:33 AM, Manu wrote:
> Most of these guys are mathematicians and physicists first, and programmers second.

You've hit the nail on the head, but it's also a question of priorities.  It's
_essential_ that the maths or physics be understood and done right.  It's
essential that the programs correctly reflect that maths or physics.  It's
merely _desirable_ that the programs run as fast as possible, or be well
designed from a maintenance point of view, or any of the other things that
matter to trained software developers.  (In my day job I have to continually
force myself to _not_ refactor or optimize my code, even though I'd get a lot of
pleasure out of doing so, because it's working adequately and my work priority
is to get results out of it.)

That in turn leads to a hiring situation where the preference is to have
mathematicians or physicists who can program, rather than programmers who can
learn the maths.  It doesn't help that because of the way academic funding is
made available, the pay scales mean that it's not really possible to attract
top-level developers (unless they have some kind of keen moral desire to work on
academic research); in addition, you usually have to hire them as PhD students
or postdocs or so on (I've also seen masters' students roped in to this end),
which obviously constrains the range of people that you can hire and the range
of skills that will be available, and also the degree of commitment these people
can put into long-term vision and maintenance of the codebase.

There's also a training problem -- in my experience, most physics undergraduates
are given a crash course in C++ in their first year and not much in the way of
real computer science or development training.  In my case as a maths
undergraduate the first opportunity to learn programming was in the 3rd year of
my degree course, and it was a crash course in a very narrow subset of C
dedicated towards numerical programming.  And if (like me) you then go on into
research, you largely have to self-teach, which can lead to some very
idiosyncratic approaches.

I hope that this will change, because programming is now an absolutely essential
part of just about every avenue of scientific research.  But as it stands, it's
a serious problem.


More information about the Digitalmars-d mailing list