- Date: 2024-03-18
- OCamlPro's ongoing task: Improving high-level optimisation on the OCaml Compiler. They are the authors behind the
Flambdaoptimisation 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, theClosurepass transformedLambdaIR toClambdaIR and handled some optimisations. Then, theCmmgenpass transformedClambdaIR toCMMIR and handled more optimisations.Flambdawas introduced withOCaml 4.03and improved inlining and related optimisations.Flambda2is meant to replaceFlambdaandClosure, translating directly toCMMand 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 Inliningand how it computes and inlines optimised function code. - Episode 4: Explores how
Flambda2processes 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) `代码` - 列表 > 引用。你还可以使用@来通知其他用户。