SIMD-accelerated FASTQ parsing using Helicase-style bitmask operations.
This crate provides high-throughput FASTQ parsing by processing 64 bytes at a time
through SIMD registers (NEON on ARM, AVX2 on x86_64), classifying newline characters
via bitmask operations and finding record boundaries without per-byte branching.
Architecture
- Lexer: Loads 64-byte blocks into SIMD registers, produces a
u64bitmask where bitiis set if byteiis a newline (\n). - Parser: Walks the newline bitmask with
trailing_zeros()to find record boundaries. Every 4th newline marks the end of a FASTQ record.
Example
use ;
let fastq = b"@r1\nACGT\n+\nIIII\n@r2\nTTTT\n+\nJJJJ\n";
let offsets = find_record_offsets;
assert_eq!;
let records: = parse_records.collect;
assert_eq!;
assert_eq!;
assert_eq!;