Ask HN: What is the best programming language for Monte Carlo simulations?

4 points by hashimotonomora ↗ HN
Balancing performance, expressability, maintainability.

Is there any specific programming language which is naturally suited for this task?

I’m comfortable with C++, Python, and Octave. Passable Common Lisp and Rust.

7 comments

[ 0.26 ms ] story [ 27.6 ms ] thread
First-class support for parallelism as a prerequisite for performance. Seems to exclude python, but pymc is great.
You can run multiple Python processes with a MC simulation and combine the results in the end.
You could do many things, but if you are focused on performance you shouldn’t do that
You mentioned Octave. Modern Fortran can be considered the compiled version of it, and many Monte Carlo calculations have been done in Fortran.
Julia seems to be a good fit. It’s python like, but a lot faster and cleaner.
(comment deleted)