What Mojo's Optimiser Leaves Out
A first look at the compiler and some learnings about Mojo's design choices
Modular AI open-sourced Mojo, the unified language for AI that promises the ease-of-use of Python and the performance of systems programming languages like C++. I knew that Mojo compiled into LLVM, so I was half expecting Mojo to be yet another LLVM frontend, and half an exciting new foundation – given that Chris Lattner is behind the project. As a researcher in weak memory models, I was keen to see the compiler optimisations Mojo takes in order to make good on the performance claim. It turns out that Mojo adopts much of the LLVM machinery, but makes deliberate choices among the optimisation passes. The architecture suggest Mojo 1.0.0, released this week, might be the first step on a longer journey.

