A better inliner for OCaml, and why it matters
blogs.janestreet.com
blogs.janestreet.com
[0]: https://github.com/fsharp/fsharp [1]: http://fsharp.org/testimonials/#grange-insurance-1
Another option with deeper language integration is mbrace: http://mbrace.io/
Vesa Karvonen ported CML to F# as Hopac, which has very good performance: https://github.com/Hopac/Hopac
Finally, there're Orleans and Naiad from MSFT:
https://github.com/ocamllabs/ocaml-multicore/graphs/contribu...
https://m.youtube.com/watch?list=PLnqUlCo055hU46uoONmhYGUbYA...
Edit: and there's also more than one repo out there.
That's untrue. There's way more out there than 'coming soon'. There's a repo with code, talks at the OCaml Workshop and blog posts describing it.
This isn't the kind of project where you want to 'move fast and break things'.
Last high-assurance work I saw done with Ocaml was Esterel's SCADE generator, which certified object code by hand. They praised the compiler for how much work they avoided w/ minimal mods. They conceivably could've gotten more done if that was automated, though.
> 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.
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.
Now, regarding the availability of libraries to build distributed system in ocaml you are totally right. For years it seams everybody was happy with mpi, then we had some sort of map reduce framework, and that's it as far as I'm aware. I would expect the growing popularity of mirage OS to improve this situation, though.
So give them both up and live in a single threaded world? Seems bleak.
Not if you're doing I/O bound work....
Glad to see OCaml concepts get popularized by other languages, that's a win-win situation for everyone.
Single core is not 'past'. 1. CPU:s are not getting that much faster every generation (one could argue that this means parallellization is critical, but...) 2. The number of cores on the average desktop is not that much. One of the reasons I think is that in many cases the individual tasks that must be performed sequentially in a typical desktop program are so tiny or hard to split that that the platform overhead and complexity of multiple threads cause the benefits from actually utilizing multiple threads to be a bit harder to reach than just using a language with a nice parallellization story. By 'benefits' I mean making the program actually faster for the user.
Of course, I'm talking about Amdahl's law https://en.m.wikipedia.org/wiki/Amdahl%27s_law
Of course, that's going to take a bit of time to compile.
Also, IIRC, all the ingredients are in place for link time optimizations, but they were not developed for ocaml 4.03.