Speed, heap, and allocation benchmarks
Every number below is parsed directly from the raw v1.8.0 benchmark artifacts
committed from clean commit 28ffe7b on a dedicated quiet Linux x86_64
host (Intel Core i7-6700HQ, Rust
rustc 1.97.0 (2d8144b78 2026-07-07)).
Geometric mean vs. pinned Rust peers
Normalized to adotenv (CompactValues) = 1.00x across all shared non-empty
fixtures (sizes 8 to 100k). Deep plum bars mark adotenv APIs.
Speed (time)
| Implementation | Ratio vs baseline |
|---|---|
| adotenv (CompactEntries) | 0.99x |
| adotenv (CompactValues) | 1.00x |
| adotenv (BTreeMap) | 1.39x |
| dotenv-flow | 2.20x |
| dotenv | 2.22x |
| dotenvs | 2.85x |
| dotenvy | 3.83x |
| dotenv-parser | 29.5x |
Peak heap
| Implementation | Ratio vs baseline |
|---|---|
| adotenv (CompactValues) | 1.00x |
| adotenv (CompactEntries) | 1.00x |
| adotenv (BTreeMap) | 1.20x |
| dotenv-flow | 2.44x |
| dotenv | 2.44x |
| dotenvs | 2.69x |
| dotenvy | 2.83x |
| dotenv-parser | 4.55x |
Retained heap
| Implementation | Ratio vs baseline |
|---|---|
| adotenv (CompactValues) | 1.00x |
| adotenv (CompactEntries) | 1.00x |
| adotenv (BTreeMap) | 1.30x |
| dotenvs | 1.30x |
| dotenv-flow | 1.35x |
| dotenv | 1.35x |
| dotenvy | 1.35x |
| dotenv-parser | 1.78x |
Allocations
| Implementation | Ratio vs baseline |
|---|---|
| adotenv (CompactValues) | 1.00x |
| adotenv (CompactEntries) | 1.00x |
| adotenv (BTreeMap) | 200x |
| dotenv-parser | 248x |
| dotenvs | 400x |
| dotenv-flow | 578x |
| dotenv | 578x |
| dotenvy | 610x |
| Implementation | Modes | Speed ratio | Peak heap | Retained heap | Allocations |
|---|---|---|---|---|---|
| adotenv (CompactValues) | load + values | 1.00x | 1.00x | 1.00x | 1.00x |
| adotenv (CompactEntries) | values | 0.99x | 1.00x | 1.00x | 1.00x |
| adotenv (BTreeMap) | load + values | 1.39x | 1.20x | 1.30x | 200x |
| dotenv-flow | load | 2.20x | 2.44x | 1.35x | 578x |
| dotenv | load | 2.22x | 2.44x | 1.35x | 578x |
| dotenvs | load + values | 2.85x | 2.69x | 1.30x | 400x |
| dotenvy | load + values | 3.83x | 2.83x | 1.35x | 610x |
| dotenv-parser | values | 29.49x | 4.55x | 1.78x | 248x |
Inspect individual sizes, shapes, and modes
Slice all 150 speed rows and 180 memory cases from v1.8.0. Switch between all libraries, Compact vs. Map, or Best competitor.
| Implementation | Value | vs. CompactValues |
|---|
Provenance & raw evidence
Both matrices were recorded from clean v1.8.0 commit
28ffe7b in a serialized single-slot benchmark queue (pre-run load1
0.30 for memory,
0.29 for speed).
Raw files: compact-memory-1.8.0.jsonl · speed-1.8.0.txt · 1.8.0 report · all historical releases (1.4.1 to 1.8.0).