Soon, I am going to write my master thesis in theoretical physics. I assume there, and later on in my career, I will have to do more serious numerics than I did up to this point. That's why I want to find out:

What programming languages are available for doing numerics in theoretical physics? What are their relative strengths/weaknesses? How do their speeds compare?

The programming language should be able to do top performance (in the first place) and at the same time be reasonable fun to programm in. Considering the first criterion, I assume there will be a mostly not opinion-based answer to my question.

So far, for most calculations in physics, I have been using Maple and Mathematica, with which I am fairly familliar with but which do not seem to provide the performance for more serious stuff. Furthermore I know Matlab, which I am using now for a year but only for a lecture of numerics thus far (so purely for elementary problems).

Then of course I know C++, where there is a numerics package called GSL. This does not seem very handy to me on the first glance.

I never worked with python but fear, it will not provide the needed performance and will be rather a drastic change from what I used so far.

So are there other options, which I oversaw? And what is the way to go for "modern numerics in physics"? What does the answer depend on?


Before answering, please see our policy on resource recommendation questions. Please write substantial answers that detail the style, content, and prerequisites of the book, paper or other resource. Explain the nature of the resource so that readers can decide which one is best suited for them rather than relying on the opinions of others. Answers containing only a reference to a book or paper will be removed!

closed as primarily opinion-based by David Z Jul 16 '14 at 18:51

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ This really is opinion-based, as most advice-type questions are. But beyond that, it's just off topic here. It would be a good topic to bring up in Physics Chat though. $\endgroup$ – David Z Jul 16 '14 at 18:52
  • 3
    $\begingroup$ It is fairly undeniable that C/C++ and Fortran are your top two/three languages when it comes to performance. $\endgroup$ – Kyle Kanos Jul 16 '14 at 18:54
  • 2
    $\begingroup$ @Hagadol There is a subtle difference. Your question is "What should I use", the other is more general "Which tools ara available". (Although the other one might be closed for being a list-type question). $\endgroup$ – Bernhard Jul 16 '14 at 19:47
  • 2
    $\begingroup$ @Hagadol: That question was posted very early on (post 401 compared to your 126828!); a lot has changed since then. $\endgroup$ – Kyle Kanos Jul 16 '14 at 19:48
  • 2
    $\begingroup$ Yes, that question was pretty old and I hadn't thought of it. I've now put a historical lock on it. $\endgroup$ – David Z Jul 16 '14 at 19:50