3 ms·
How does Ocaml do on having predictable memory usage? This is still a weak spot in Haskell, though I absolutely love the language and it hasn't mattered yet for
by codygman 12y ago
How does Ocaml do on having predictable memory usage? This is still a weak spot in Haskell, though I absolutely love the language and it hasn't mattered yet for my use cases.
Doesn't it hurt having a GIL?
How awesome is having the ML module system?
- mads_hartmann 12y agoOCaml has an extremely predictable memory usage. Part III of Real World OCaml covers this is great detail[1] GC pauses haven't hurt us really. We usually just spawn a ton of processes so if one process pauses a bit to GC we won't notice. The module system is awesome. It's something i plan to cover next time I find the time to extend the article. [1] https://realworldocaml.org/v1/en/html/pt03.html https://realworldocaml.org/v1/en/html/pt03.html
- jamii 12y agoThe ocaml runtime is wonderfully simple (http://rwmj.wordpress.com/2009/08/04/ocaml-internals/ http://rwmj.wordpress.com/2009/08/04/ocaml-internals/) and the compiler focuses mostly on good codegen rather than advanced optimisations. In practice, it's common to be able to look at a block of code and predict how fast it will be and how much memory it will allocate. This is not my experience in haskell - the difference in performance when certain optimisations do or don't trigger is huge and is hard to predict just by reading the source code.
- pjmlp 12y ago> Doesn't it hurt having a GIL? There is ongoing work to make the runtime multicore friendly without GIL. Plus the GIL doesn't affect when you write concurrent code, which makes use of green thread, think go-routines. It is only an issue in Python and Ruby because they jump out to C extensions which use the GIL, while OCaml is a native compiled language. Anyway OCaml vnext whenever comes out, might be GIL free.