4 ms·
OCaml's great, but my understanding is that you have to use imperative features in order to get C performance. For most programs, you don't care about getting
by time_management 18y ago
OCaml's great, but my understanding is that you have to use imperative features in order to get C performance.
For most programs, you don't care about getting C performance, and functional OCaml code does an excellent job.
I should not have said that writing "fast-running" code in Ocaml is painful and ugly, since normal OCaml code runs fast enough for most purposes. What I meant to say is that writing optimized code in OCaml can be painful.
- jlouis 18y agoYou don't need C's performance in 99% of the code. In fact, in most projects you far from need C's performance anywhere. Had it been the case, then fewer would write Ruby, Python or PHP these days. The performance of OCaml is really good if you write no imperative code. If you have a cost-centre that bothers you, it is pretty easy to get it fast: OCamls compiler does very little optimization, so a bit of manual rewriting helps a long way. There are several documents on the net that explains how to manually optimize a cost centre.