IT lexicon › Programming › BOLT

BOLT

Programming På svenska → Updated: 2026-11-05
More info
Creator
Facebook (Meta)
Type
Post-link optimizer
License
Apache 2.0 with LLVM exception
Source
github.com/llvm/llvm-project

A tool that takes an already-linked binary, measures how it runs and rewrites the order of functions and basic blocks so that hot code sits close together.

The Binary Optimization and Layout Tool was built at Facebook to squeeze the last few percent out of huge server binaries that were already compiled with PGO and LTO. Instead of instrumenting the program, BOLT reads sampling profiles from perf, ideally with the CPU's Last Branch Record, so it knows which jumps are actually taken in production. It then disassembles the binary, rearranges the code layout and writes it back out.

Working after the link step sounds like a hack, and it is, but it sees the whole program, including libraries and hand-written assembly the compiler never touched. The project moved into LLVM in 2022. Google built Propeller over the same period with the same goal and a different architecture, which says something about how much money rides on a data centre running a few percent faster.

← Back to the lexicon