I am not trying to start a Language flame war here. I merely want to ask a simple question:

Is there a good resource for comparisons for languages for scientific computing?

By comparisons, I mean on the grounds of: Number of stable libraries which can be used. Programming Effort Speed etc.

I found a couple of comparisons online but all seemed to be relevant to general computer programmers (not for Numerical Computing).

Also, I am asking the question for general scientific computing, not necessarily for matrix algebra. For instance, this also includes statistics, engineering etc.

I am not trying to ask a "which language should I learn" type of question. I am asking for good comparisons.

I am especially interested in C,Java,C++,C# and Python. The goal is to build usable code in variety of scientific applications with different hardwares (including Android) using as many stable libraries along the way.

I also read Parallel Scientific Computation Software Development Language? but it is too focussed on Matrix algebra.

  • $\begingroup$ As it is, the question is really hard to answer. What do you want to know? Which is the most used language? Which is the most efficient? $\endgroup$ – Dr_Sam Jun 12 '13 at 6:51
  • 3
    $\begingroup$ There is no a priori best choice. I'd rather say that some languages or more suitable for specific problems than others. So, to give a good comparison it'd be great if you gave some more information on the problems you want to tackle. $\endgroup$ – AlexE Jun 12 '13 at 8:17
  • $\begingroup$ This question is simply too broad and ill-defined. Numerical computing comprises an enormous range of activities, projects, and programming needs, and no language is going to be able to fill every niche. Any attempt to compare languages at such a high level is going to be so filled with caveats and contingencies as to be functionally useless. "Which language" discussions -- both here and on StackOverflow -- tend to be poorly suited to the format of StackExchange, and this is no exception. $\endgroup$ – Ben Jun 12 '13 at 17:56
  • 1
    $\begingroup$ Also, this question can be salvaged if its focus can be somehow constrained. Are you interested in a comparison of the manner in which scripting languages and compiled languages are used in numerical computing? Is there a specific set of tasks you'd like to accomplish? $\endgroup$ – Ben Jun 12 '13 at 18:10
  • $\begingroup$ Quite often, libraries written in one language is callable from another language. So a single language isn't the only option. $\endgroup$ – Damien Jun 12 '13 at 23:04

My advise to students is always this: The most precious resource of all is your own time. If there is a programming language A that allows you to write a program in half the time it would take you with language B, but the program is 20% slower, then this is still almost always a win, unless you need to run the program for months.

This is the reason why most modern scientific computing libraries are written in C++ and no longer in Fortran or plain C: because it is so much faster to write and debug code in C++ than in Fortran, and because of the huge number of other libraries you can then use (including, in particular, the C++ standard library) and that make programming so much faster.

| cite | improve this answer | |

It is possible to do any feasible computations in any Turing-complete language.

Thus, the comparison is not between languages but between compilers, runtimes, and library sets. This assumes that those who devise and implement the algorithm are competent enough in the chosen language. The runtimes and libraries (as-shipped) should be using the lowest complexity algorithms.

The Benchmarks' Game is a fantastic resource that could be used for educational purposes. Really an eye-opener for performance-obsessed types (and if you are dealing with realistically-sized problems, you are one of them).

However speed is not everything - the real devil lies in small details (correctness):

  • How are floating-point numbers parsed, rounded, and output?
  • Is there any library function to force a specific rounding mode?
  • Are math functions working for corner cases (plus and minus zero, etc.)?
  • Is there any handling for underflows?
  • Do built-in facilities for handling complex numbers conform to accepted practices and standards?

Must say your question is misleading: there are precious few things in statistics and engineering and whatever other disciplines that can be accomplished without matrix computations.

| cite | improve this answer | |

I would reccomend such an approach: you should learn one general purpose (generating fast code - compiled) language like C/C++ or Fortran. My favourite is C++. On each of those you can use easily dll's, you have BLAS/LAPACK libs, also there are CUDA (Fortran and C) or OpenCL (looks like C) extensions for computing on GPU.

On the other hand it is convinient to use a so-called script language that is oriented for scientific computing, so you could easily check if something will work at all, to make nice plots easily and so on. I have used Scilab, and now I am trying to learn Mathematica for this purpose.

My choice is: C++ (a lot of available numerical (BLAS/LAPACK, GNU math library, CGAL, ...) and visualization (VTK) libs. For high efficiency work (not HPC computing) Mathematica or Maple is quite useful but is sometimes annoying, but really powerful.

| cite | improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.