ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

programming language for math

(1/3) > >>

kalos:
hello!

which programming language is more fast at calculating math?

maybe machine language?

thanks!

f0dder:
Define "fast".
Define "math".

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 :-)

Shades:
'R' is a (and for some, THE) programming language for math. Maybe that could be the answer to the question.

Renegade:
I suppose some options are:

R (mostly for stats from what I've heard people talk about - not sure about performance)
C
Fortran (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#
Erlang
etc. 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.

jgpaiva:
I've read very good things about python with numpy. In particular, I found this article interesting: 10 Reasons Python Rocks for Research (And a Few Reasons it Doesn’t). I've never used it with that intent, though. And I agree with f0dder: you need to clarify a bit better your question :)

Navigation

[0] Message Index

[#] Next page

Go to full version