Hacker News new | ask | show | jobs
by reikonomusha 2070 days ago
SML’s compilers and implementations are state of the art. Advanced optimizing compilers and multicore are already huge differentiators.

Also, Standard ML is, well, standardized. The standard isn’t perfect but it at least allows for a strong ecosystem of independent implementations.

1 comments

I was under the impression that ocaml’s optimization was pretty good. Granted multicore is not here yet.
Ocaml's optimization is very good, but not perfect. For example, if you need 32-bit integers instead of 31-bit integers, your performance is going to tank due to boxing.

MLton is a whole program optimizer (rather than function at a time like Ocaml) and wrings out a ton of performance though compile times are quite a bit longer.

I believe flambda is whole program, could be wrong tho
https://www.cs.cornell.edu/courses/cs3110/2017fa/htmlman/fla...

As of 3 years ago it wasn't, but maybe that has changed.

Whole program compilation isn't without its downsides though. It seems pretty common to develop in SML/nj because of fast compiling then doing final performance profiling and deploying with mlton (having a standard helps). Function at a time is also more amenable to caching and reusing part of the previous compile.