A zero-allocation, high-performance parser for fixed-length and variable-length files in .NET, using expression trees and Span.
RecordParser is a high-performance, zero-allocation parser for .NET that reads and writes structured data from fixed-length and variable-length files like CSV and TSV. It solves the problem of slow, memory-intensive file parsing by using Span and expression trees to generate optimized code, resulting in minimal GC pressure and fast processing speeds.
.NET developers working with large data files, financial services, ETL processes, or any scenario requiring efficient parsing of CSV, TSV, or fixed-width formats.
Developers choose RecordParser for its exceptional performance (ranked 2nd in fastest CSV parser benchmarks), zero-allocation design, and flexibility in mapping complex data structures without intrusive dependencies.
Zero Allocation Writer/Reader Parser for .NET Core
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Benchmarks show it ranks 2nd fastest in .NET CSV parsing, handling 1 million lines in 826ms by leveraging Span and expression trees for optimized code generation.
Uses Span extensively to avoid heap allocations, minimizing garbage collection overhead, which is critical for high-throughput data processing applications.
Supports both indexed and sequential mapping for fixed and variable length files, allowing precise control over complex data structures without intrusive changes to domain classes.
Enables multicore reading and writing through ParallelismOptions, speeding up large file operations with configurable degrees of parallelism.
Mapping configuration is external using builders, keeping types dependency-free and promoting low coupling, as emphasized in the README's philosophy.
Only handles fixed-length and delimited files like CSV/TSV; lacks built-in support for other common formats such as JSON or XML, limiting its use in diverse data pipelines.
The builder-based API requires more code for simple parsing tasks compared to drop-in solutions, adding complexity for straightforward use cases like basic CSV reading.
Advanced features like custom converters using expression trees and parallel processing require deeper .NET knowledge, which can be challenging for developers new to these concepts.
As a niche, performance-focused library, it has fewer community resources, tutorials, and third-party integrations compared to more established parsers like CsvHelper.