https://pl-rants.net/posts/go-and-ocaml-scalability/ has an interesting take where they found multi-process OCaml performing better than goroutines. I don't know how to interpret those measurements correctly, so any help there would be appreciated.
This experiment has "embarrassingly parallel" data, ie there is little to no benefit to sharing data between computations. It's not surprising that multiprocess does well on this, but this is not common in most real world applications. Imagine a simple chat server, where every request needs to read and write shared state. Even when the application doesn't seem to have shared state, any in-memory caching requires it.
Re:OCaml for the Masses (2011)
by anentropic on Monday November 26, 2018 @10:49AM
(#18534118)
"most real world applications" is a meaningless phrase, I doubt anyone can quantify "real world applications" one way or the other
also the result is still interesting, why wouldn't goroutines scale just as well, but apparently didn't?
That's fair, but perhaps I can rephrase it to say that embarrassingly parallel applications are a well known edge case and not the norm.
That makes sense. Thanks.
Did you try Lwt/Async? I'm a ocaml novice and i'm curious how far one can get with them.
Neither lwt nor async allow for parallel execution cause of the Gil. They are akin to async await in Python
Where threads aren't part of the equation, OCaml has become suddenly popular. That's telling.