A freestanding C++20 input/output library designed to replace <iostream> and <cstdio> with exceptional performance.
fast_io is a high-performance, header-only C++20 input/output library designed to replace traditional C++ streams (<iostream>) and C stdio functions (<cstdio>). It provides faster I/O operations, extensive Unicode support, and modern C++ features while maintaining compatibility with existing code. The library solves the performance and safety issues associated with standard I/O libraries by minimizing abstraction overhead and offering secure, stateless APIs.
C++ developers working on performance-critical applications, embedded systems, or cross-platform projects who need efficient and reliable I/O operations. It is particularly useful for those dissatisfied with the speed and binary bloat of standard C++ streams.
Developers choose fast_io for its benchmark-proven speed advantages over alternatives, its modern C++20 design with concepts, and its comprehensive feature set including Unicode handling, binary serialization, and freestanding support—all in a header-only package.
Freestanding fast input/output for C++20
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The README shows extensive benchmarks where fast_io outperforms <iostream>, <cstdio>, and fmtlib by up to 10x, such as outputting 10M integers in 0.049s vs 0.462s for fstream on Windows.
As a header-only library using C++20 concepts, it offers a clean, extensible API without historical baggage like std::endl or traits_type, as emphasized in the philosophy.
Supports UTF-8, UTF-16, UTF-32, and niche codecvt like GB18030, with SSE-optimized conversions that beat GNU iconv in benchmarks (e.g., 0.442s vs 0.844s for UTF-8 to UTF-32LE).
Works in environments without a full standard library and is tested on Windows, Linux, and MinGW, providing consistent RAII wrappers for file descriptors and handles.
Requires a C++20 compiler with concepts support, limiting adoption in legacy codebases or environments stuck on older standards, as noted in the README.
The API diverges from standard I/O, and documentation is split across Gitee and Bitbucket wikis, making learning and troubleshooting more difficult than with established libraries.
Uses the Anti-Tivo License, which may be restrictive for some uses, and the repository is archived, indicating potential abandonment and lack of future updates.