A modern, minimal, and high-performance .NET library for reading and writing CSV/TSV files with zero allocations and SIMD-accelerated parsing.
Sep is a high-performance .NET library for reading and writing separated values like CSV and TSV files. It solves the need for fast, memory-efficient data parsing in modern .NET applications, especially in machine learning and data-intensive scenarios, by leveraging SIMD vectorization and zero-allocation techniques.
.NET developers working with large CSV/TSV datasets, particularly in machine learning, data science, or high-throughput data processing applications where performance and memory efficiency are critical.
Developers choose Sep for its unmatched speed (up to 35x faster than CsvHelper), zero-allocation design, and modern API. It outperforms other .NET CSV parsers with SIMD acceleration, parallel parsing, and seamless integration with latest .NET features.
World's Fastest .NET CSV Parser. Modern, minimal, fast, zero allocation, reading and writing of separated values (csv, tsv etc.). Cross-platform, trimmable and AOT/NativeAOT compatible.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses architecture-specific SIMD vectorization (AVX2, AVX-512, NEON) and csFastFloat to achieve parsing speeds up to 21 GB/s on modern hardware, as demonstrated in benchmarks against CsvHelper and Sylvan.
Intelligent memory management with ArrayPool<T> and pooled string handling eliminates allocations after warmup, even for array-based operations, reducing GC pressure significantly in data-intensive scenarios.
ParallelEnumerate provides multi-threaded parsing with up to 35x speedup over alternatives for large datasets, leveraging .NET's thread pool efficiently for machine learning use cases.
Built with .NET 7+/C# 11+ features like Span<T>, ref struct, and ISpanParsable, ensuring optimal performance and seamless integration with latest .NET advancements for cross-platform and AOT compatibility.
Fully trimmable and NativeAOT compatible, producing small executables (a few MBs) ideal for deployment in constrained environments, as highlighted in the README's philosophy.
API uses ref structs for rows and columns, preventing LINQ compatibility and making it impossible to store rows in arrays or use common .NET collection patterns without extra parsing into other types, as admitted in the 'Why SepReader Was Not IEnumerable' section.
Lacks built-in support for comments, automatic escaping/unescaping by default, and advanced CSV features like schema validation, requiring manual implementation for edge cases as noted in the limitations section.
Enabling features like string pooling or unescaping requires explicit options configuration, and in-place modification for unescaping/trimming can lead to confusing state if not handled correctly, adding overhead for developers.
Separator char is validated and limited (not any char can be used), and the opinionated API with short names (e.g., Sep, Col) may be less intuitive for those accustomed to more descriptive libraries, potentially increasing onboarding time.