4 ms·
It sounds the real benefit for you is in OTP rather than anything intrinsic to Erlang's multicore implementation. > not see that multicore and multi-node are r
by jallmann 11y ago
It sounds the real benefit for you is in OTP rather than anything intrinsic to Erlang's multicore implementation.
> not see that multicore and multi-node are related
There is a huge distinction in implementation, which Erlang/OTP abstracts over for you somewhat (but not entirely...). By optimizing for the distributed (multi-node) scenario, you decouple the that work from the language implementation -- and multiple processes per CPU would benefit just as well as a cluster. A distributed cluster does not benefit from a multi-core implementation. Given the baggage most languages have with the GIL (including OCaml), optimizing for single threaded performance seems like the correct decision here.
With Erlang, distribution is accomplished with the epmd registry, something similar could be done with OCaml as well. As you noted, there is no OTP-like system for OCaml, but the absence of one does not hinge on any multicore implementation. Single-threaded OCaml processes handle concurrency just fine, and usually faster than Erlang, to boot.
Personally, if the OCaml multicore work ends up slowing down the core runtime appreciably, I'm going to be upset.
- vegabook 11y ago> Personally, if the OCaml multicore work ends up slowing down the core runtime appreciably, I'm going to be upset That's what I meant in my original post about multicore seeming controversial. That's part of the reason that for me, a super-speedy single-core Ocaml coupled with an industrial strength OTP-style distributed computing framework, would be awesome. I'm actually not that excited about multicore. My use case is lots of streaming data coming in, needing to be parsed, lots of heavy lifting stats work done in real time, then distributed to clients. So it needs both very high performance on the single thread (currently using GPU-accelerated calls to Numpy), and then very efficiently be able to distribute heterogenous data to lots of endpoints. I really would love to be able to do it all in Ocaml.