OxCaml, Oxidized!
Jane Street open sourceed their production compiler for OCaml12, which focuses on performance and correctness. It is called OxCaml, a fast-moving set of extensions to the OCaml programming language.
Highlights:
OxCaml's primary design goals are:
- to provide safe, convenient, predictable control over performance-critical aspects of program behavior
- but only where you need it,
- and ... in OCaml!
OxCaml's extensions
Our extensions can be roughly organized into a few areas:
- Fearless concurrency: Writing correct concurrent programs is notoriously difficult. OxCaml includes additions to the type system to statically rule out data races.
- Layouts: OxCaml lets programmers specify the way their data is laid out in memory. It also provides native access to SIMD processor extensions.
- Control over allocation: OxCaml gives programmers tools to control allocations, reducing GC pressure and making programs more cache efficient and deterministic.
- Quality of life: OxCaml also contains some extensions that aren't specifically about systems programming, but which we've found helpful in our day-to-day work
I'm so admired as a Scala Native coder. The good news is that I've been thinking about similar things for Scala Native for a long time and trying to do so. The bad news is that I may don't have the necessary resources or free time. However, I think OxCaml is a great project to follow and learn from.
Footnotes
-
oxcaml/oxcaml: OCaml - Oxidized! ⤴