rypipe is designed to keep parsing fast: arena string storage, SIMD UTF-8
validation, zero-copy event parsing, GIL-free Rust work, parallel chunking, and
a bounded-memory streaming path. This page is a summary reference; see the
Architecture and Advanced sections for
detailed explanations.
The numbers below come from the built-in bench_throughput example. It uses a
tiny inline TSV-like adapter so the result measures the engine, not an external
parser.
Run it yourself:
cargo run --release -p rypipe-core --example bench_throughputHardware: Linux workstation, AMD Ryzen 9 5900X, DDR4-3200, release build.
| Path | Rows | Time | Rows/s | MB/s | RSS |
|---|---|---|---|---|---|
Pipeline::read_path |
5,000,000 | 1.18 s | 4.23 M | 253 | 290 MB |
Pipeline::read_path_par (4 chunks) |
5,000,000 | 1.33 s | 3.76 M | 225 | 388 MB |
Pipeline::read_path_par (8 chunks) |
5,000,000 | 1.35 s | 3.71 M | 222 | 486 MB |
Pipeline::read_path_stream (64 MiB) |
5,000,000 | 1.92 s | 2.61 M | 156 | 693 MB |
Single-thread parse is fastest for this simple TSV adapter because chunk overhead dominates. Parallel mode trades a small throughput drop for much higher CPU utilization and scales better with heavier parsers. The bounded streaming path keeps intermediate batches near the 64 MiB budget but has higher peak RSS because of the Arrow export buffer.
| Knob | Recommended | See also |
|---|---|---|
num_chunks |
4 * physical_cores |
Parallelism |
memory |
500 MB for workstations | Memory and chunking |
use_mmap + prefault |
True/True for cached files; True/False for large |
I/O tuning |
auto_dict |
False for throughput; True for compression |
Dictionary encoding |
field_types |
Declare known numeric columns | Schema and types |
schema_order |
Provide when column order matters | Schema and types |
ParallelExecutor has two internal paths:
- Fast path: when
auto_dictis false and schemas are consistent across chunks, each chunk is exported as its ownRecordBatchin parallel. No serial merge. Compare filters are applied per-row during parse AND reapplied after export viaapply_compare_filter, so they do not force the merge path. - Merge path: when
auto_dictis enabled or schemas are inconsistent, chunk builders are merged sequentially before export. Peak RSS is higher.
If you need both a Compare filter and maximum throughput, the fast path
already handles it (Compare is applied post-export). For auto_dict with
Compare, the incremental dict path preserves the fast path when schemas
are consistent.
crxml (Crystal Reports XML, at docs/crxml-adapter.md) is the reference
for what a good adapter looks like: hand-rolled memchr scanner, shared
between columnar and streaming paths, wants-driven skip-bytes, and
parallel fast path. On a Ryzen 5800X: ~950 MB/s single, ~4.2 GB/s
parallel (par128), with streaming at 723 MB/s (single-thread, 1 MB
budget).
- A generic streaming
RecordParsercould support chunked async input. - Dictionary encoding could be made incremental across chunks to recover the
fast path for
auto_dict=True.
- Architecture: engine design and fast/merge paths.
- Execution modes: when to use each mode.
- Memory and chunking: budget sizing.
- Parallelism: chunk scaling.
- Profiling: how to measure performance.