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.

The Relaxed Memory Model Zoo

Mapping the space of weak memory models

Comparing two memory models means reading two papers and reconstructing a containment argument nobody wrote down. The Relaxed Memory Model Zoo is a map of 101 models and 145 relations where every edge states how it is known — machine-run litmus test, by construction, or cited — and a consistency gate refuses to ship a map that contradicts itself. This post covers the motivation, the evidence discipline, how the dataset was built (including where AI was used and where it was not trusted), the principles that kept it small, and how to submit corrections. A follow-up post will use the same litmus tests to locate real Rust in the lattice.

Mitigating ABA for Compare-and-Swap: a Survey

Compare-and-swap (CAS) is a central part of many implementations of lock-free algorithms synchronizing values in shared data structures. Without further scaffolding, CAS is inherently prone to the ABA problem. In this post I survey solutions mitigating ABA in the context of CAS towards a high-level classification.