HACKER Q&A
📣 hashimotonomora

What is the best programming language for Monte Carlo simulations?


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.


  👤 d--b Accepted Answer ✓
Julia seems to be a good fit. It’s python like, but a lot faster and cleaner.

👤 iab
First-class support for parallelism as a prerequisite for performance. Seems to exclude python, but pymc is great.

👤 n3t
Slightly off-topic but ProbLog[0] might interest you.

[0]: https://dtai.cs.kuleuven.be/problog/


👤 Bostonian
You mentioned Octave. Modern Fortran can be considered the compiled version of it, and many Monte Carlo calculations have been done in Fortran.