Learn OCaml the Hard Way

Predictable Performance of OCaml's Module System

OCaml’s module system can be a powerful tool for building generic code and structuring systems. Functors are functions from modules to modules and they serve an important role for the power of module system. However, I want to know if functors (and the module system) can be optimized away by the OCaml compiler. » Read More


Going through the OCaml compiler pipeline (manually)

Modern compilers usually composed by multiple stages: parsers, optimizers, linkers, and assemblers. Let’s go through it one by one to have a better understanding of the OCaml compiler. » Read More


A Taste of OCaml's Predictable Performance

eqaf, a constant-time compare function implementation in OCaml, is a great case to demonstrate the predictable performance of OCaml’s compiler. Why? » Read More