Nothing beats assembly code hand-tuned for a specific CPU... but that might take prohibitively much longer time to write than some higher-level language, and sometimes for marginal gains. You're best off using some language that's math-friendly and has optimized standard (math) libraries, then perhaps hand-tuning your code once you've got your algorithms working correctly.

But all the above is hand-waving as long as your question is so general :-)

R (mostly for stats from what I've heard people talk about - not sure about performance) CFortran (this is a Ferrari for performance) Matlab (think of this as for prototyping)

The entire class of functional languages are well suited to math:

F#Erlangetc. etc.

Lisp is highly performant, and a darling in academia. Might be worth looking at.

But as f0dder said, the lowest level languages are going to take forever to program in. ASM (etc.) probably isn't worth even looking at. You can just buy more computing power, and it will likely be cheaper than your development time.

R (mostly for stats from what I've heard people talk about - not sure about performance) CFortran (this is a Ferrari for performance) Matlab (think of this as for prototyping)

The entire class of functional languages are well suited to math:

F#Erlangetc. etc.

Lisp is highly performant, and a darling in academia. Might be worth looking at.

But as f0dder said, the lowest level languages are going to take forever to program in. ASM (etc.) probably isn't worth even looking at. You can just buy more computing power, and it will likely be cheaper than your development time.

If you are talking about writing high-performance software, most high speed math libraries are written in C, and most C compilers provide optimization choices to help speed up math routines. Depending on whether or not you will be working in floating point also makes a difference -- there are libraries optimized for math co-processors and parallel processing, and for nearly any math functions you might desire. Fortran is still widely used because it is easier to program (for mathematicians) but not as efficient or flexible as C/C++.

If you are talking about the need to quickly implement a variety of math calculations, processing speed is not as important a factor as the ability to use existing routines that are known to do the job properly. There are many specialized math programming systems, most of them pricey, favored by different folks in different fields: Mathematica, Matlab, Gauss, etc.. R is a good choice for statistics, but is inefficient on large data sets.

[Off-topic]Does anyone else experience trouble accessing the giveawayoftheday website? It is now already about a month I cannot access any content from anywhere in Paraguay, I just get blank pages.[/Off-topic]