
So I wonder of existing projects of such type, both Molecular dynamics and Monte Carlo methods.
The fastest Haskell Monte Carlo code I've seen in action is Simon's port of a Monte Carlo Go engine: http://www.haskell.org/pipermail/haskell-cafe/2009-March/057982.html http://www.haskell.org/pipermail/haskell-cafe/2009-March/058069.html That is competitive to lightly optimised non-Haskell versions, though not competitive with highly optimised versions (the kind that slows down when you update your compiler, but gives you dramatic boosts due to detailed attention both to generated assembly code and to high-level algorithm shortcuts). Though there's also specialization as an option http://www.cse.unsw.edu.au/~chak/papers/KCCSB07.html and googling for "haskell monte carlo" give a few more hits, such as http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.47.2981 http://www.citeulike.org/user/dguibert/article/561815 and even some hackage package, though I don't know whether efficiency was a concern there?
I've got also some technical questions. Now I'm using 2D DiffUArray to represent particle positions during the simulation (when there are lots of array updates). Is this reasonably fast (I want to use pure external interface of DiffArray)?
DiffArray is slow (don't know about DiffUArray): http://hackage.haskell.org/trac/ghc/ticket/2727 The default Random is also slow (see the mersenne alternatives on hackage instead, and be careful if you use them through the standard class interface): http://hackage.haskell.org/trac/ghc/ticket/2280 http://hackage.haskell.org/trac/ghc/ticket/427 Claus