A fast, header-only C++11 library for reading CSV files with automatic column rearrangement, threading for I/O overlap, and configurable parsing features.
fast-cpp-csv-parser is a header-only C++ library for reading CSV files efficiently. It solves the problem of parsing large, structured tabular data quickly by using threaded I/O overlap and compile-time configurable parsing features. It supports automatic column rearrangement via headers, custom separators, and provides informative error handling.
C++ developers who need to read and process CSV files in performance-sensitive applications, such as data analysis tools, scientific computing, or backend systems handling large datasets.
Developers choose this library for its combination of speed, simplicity, and flexibility—it's header-only, requires only C++11, and allows fine-grained control over parsing behavior without runtime overhead for unused features.
fast-cpp-csv-parser
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 library is contained in a single header file, requiring no separate compilation or build steps, making integration into C++ projects straightforward.
Overlaps disk reading and CSV parsing using threads, enabling efficient processing of multi-gigabyte files with reduced latency, as highlighted in the README.
Parsing features like trimming, quoting, and overflow handling are template-based, ensuring no runtime overhead for disabled features, aligning with the 'pay only for what you use' philosophy.
Parses header lines to automatically rearrange columns by name, allowing flexible file formats without manual column indexing or reordering code.
Explicitly does not support quoted strings containing unescaped newlines, a limitation admitted in the FAQ that restricts use with certain CSV formats like those with embedded text blocks.
Requires the number of columns to be specified at compile time via a template parameter, making it unsuitable for files with dynamically varying or unknown column counts at runtime.
Depends on threading for optimal performance, requiring specific compiler flags (e.g., -lpthread with GCC) and careful linking order; disabling threads with CSV_IO_NO_THREAD can degrade performance on large files.