Dana v0.7.2 Benchmarks: Zero-Crate Rust vs. Python, Pandas, and Polars
Reproducible end-to-end numbers across CSV UDF ETL, 500k×50k Parquet joins, SQLite pushdown with FERPA privacy, and Parquet statistical reporting.
Dana compiles .dana pipelines in Zero-Crate Rust (std only plus minimal C shims for SQLite, OpenSSL TLS, and zlib/zstd) down to a 2,048-row vectorized columnar VM that inlines pure user-defined functions directly into register bytecode.
In v0.7.2, Dana outperforms Pandas across all four end-to-end workloads and beats Polars on 500k × 50k Parquet joins, SQLite pushdown with FERPA small-group suppression, and Zstd Parquet statistical reporting—while keeping exact 128-bit Decimal arithmetic and static privacy proofs intact.
Headline Median Latency (End-to-End Subprocess)
Every run is measured in a fresh child subprocess (1 warmup + 5 timed runs, AMD EPYC 9554P, Linux 6.12.115 x86_64, Python 3.15.2, Pandas 3.1.1, Polars 2.2.0) and checked for cell-for-cell output parity:
| Workload | Rows | Dana v0.7.2 | Python stdlib | Pandas | Polars | Dana vs. Polars |
|---|---|---|---|---|---|---|
| W1: CSV + UDF ETL | 500,500 | 368.3 ms | 1,366.3 ms | 1,856.7 ms | 322.2 ms | 1.14× slower (exact Decimal) |
| W2: 500k×50k Join + UDF | 500,000 | 152.8 ms | 992.3 ms | 522.0 ms | 280.2 ms | 1.83× faster |
| W3: SQLite + FERPA Privacy | 250,000 | 107.8 ms | 160.3 ms | 595.0 ms | 360.6 ms | 3.35× faster |
| W4: Parquet + Stats + HTML | 200,000 | 125.1 ms | 645.5 ms | 519.6 ms | 243.4 ms | 1.95× faster |
Peak Memory & Speedup Since v0.3.0
Moving CSV/Parquet ingestion directly into contiguous Val::Columnar(Arc<VmTable>) batches eliminated boxing overhead across the pipeline:
- W1 (CSV + UDF ETL):
3,602.9 ms→368.3 ms(9.78×faster) ·1,325.1 MiB→116.9 MiB(−91.2%peak RSS) - W2 (500k×50k Join):
1,504.0 ms→152.8 ms(9.84×faster) ·781.8 MiB→99.2 MiB(−87.3%peak RSS) - W3 (SQLite + FERPA):
127.1 ms→107.8 ms(1.18×faster) ·29.0 MiB→22.2 MiB(−23.5%peak RSS) - W4 (Parquet + Stats + HTML):
1,110.2 ms→125.1 ms(8.88×faster) ·350.1 MiB→53.2 MiB(−84.8%peak RSS)
Parameterized SQLite Pushdown + Provenance (dana explain)
On W3, dana explain --dialect sqlite proves both parameterized SQL pushdown and static [ferpa] / [pii] clearance before any rows touch an output sink:
[SQL PUSHDOWN -> sqlite]
SELECT "student_id", "department", "term_seq", "age_years", "grade_points",
(CASE WHEN ("age_years" < ?) THEN ? ... ELSE ? END) AS "age_band"
FROM "StudentEnrollment"
WHERE ("active?" AND ("term_year" >= ?))
[SENSITIVITY PROVENANCE]
ENTER SourceDB(StudentEnrollment): tags=[ferpa, pii]
DROP_COL Select(...): removed [student_email:[pii]]
BUCKET Derive(age_band <- age_years): tags=[ferpa], bucketed=true
PROPAGATE Summarize: aggs=[students(CountDistinct,Blending)=[ferpa, pii], ...]
CLEAR SuppressSmallGroups(min=5, mode=Drop): cleared [ferpa, pii]
OUTPUT: PUBLIC (no sensitivity tags remaining)
Read the full benchmark breakdown and reproduction commands at dana.robertguss.com/benchmarks.