- Date: 2024-03-18
- OCamlPro's ongoing task: Improving high-level optimisation on the OCaml Compiler. They are the authors behind the
Flambda
optimisation pass and introduceFlambda2
. - About Flambda2: A new optimising backend for the OCaml native compiler. This series of blog posts will cover everything about it, providing context and history about
Flambda2
, its predecessorFlambda
, and the OCaml compiler. - Compiling OCaml: Done through multiple passes. Before
Flambda
, theClosure
pass transformedLambda
IR toClambda
IR and handled some optimisations. Then, theCmmgen
pass transformedClambda
IR toCMM
IR and handled more optimisations.Flambda
was introduced withOCaml 4.03
and improved inlining and related optimisations.Flambda2
is meant to replaceFlambda
andClosure
, translating directly toCMM
and allowing for more optimisations. - Snippets Roadmap: This is the zeroth snippet, providing history and context. The rest will alternate between technical deep dives and user-facing descriptions of new optimisations.
The F2S Series:
- Episode 1: Covers the characteristics and benefits of a CPS-based internal representation for OCaml optimisation.
- Episode 2: Introduces
Loopify
, the first optimisation algorithm, and explains how it transforms tail-recursive functions. - Episode 3: Introduces
Speculative Inlining
and how it computes and inlines optimised function code. - Episode 4: Explores how
Flambda2
processes and optimises code through structured traversals. - Episode 5: Coming soon.
- About OCamlPro: A R&D lab founded in 2011, providing various services such as audit, support, custom tools, and training. They create open-source projects and are experts in Formal Methods. Reach out at contact@ocamlpro.com or book a quick discussion.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。