fmt: C++ formatting that is 50% faster than printf, with type safety
fmtlib/fmt
About the project
A high-performance formatting library that replaces the slow iostreams and unsafe printf of the C++ standard library. It supports intuitive Python-style syntax while functioning as an implementation of C++20's std::format and C++23's std::print.


Benchmark results show it is approximately 50% faster than printf, with performance differences of up to 20–30x for float/double conversions. Compile times are about 1/10th that of Boost Format, and binary size increases are minimized, allowing for easy adoption into existing projects.
It catches format string errors at compile time to prevent runtime bugs and eliminates buffer overflow risks through automatic memory management. With a self-contained structure that has no external dependencies, it is widely used in large-scale systems such as PyTorch, MongoDB, and ClickHouse.
fmtlib/fmt
A modern formatting library
C++
This introduction was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report errors, attribution issues, or removal requests via Contact.