1.5.0 compact values benchmark results
Status: publication-grade 1.5.0 compact-values evidence. The memory run is from the release candidate and the speed run is post-release, benchmark-only evidence; neither replaces the historical 1.4.1 map-based claim.
Compact is the opt-in CompactValues API with one value buffer and one fixed-size entry per key. Map is the standard parse_values/load_values API that returns a BTreeMap<String, String>. Both expose the same effective keys and values. The charts default to all available pinned libraries and can also isolate compact vs map or show the best competitor.
Memory chartExplore retained heap, peak heap and allocations by size, shape and mode. Speed chartExplore values and load timings by size, shape and mode.
The compact representation was measured on the dedicated Linux reference host
for memory from SHA
0a9fc92 and for speed from SHA 79937cc, using the same fixtures and
comparable values/load modes as the 1.4.1 results. Version
1.5.0 was tagged at 70f9762. The memory source is the release candidate;
the speed source is a later benchmark-only commit. Raw evidence:
- Compact memory JSONL – 165 cases
- Compact memory table
- Compact memory fingerprint
- Compact speed bencher output – 140 cells
- Compact speed table
- Compact speed fingerprint
Provenance
Section titled “Provenance”| Metric set | Source SHA | Fingerprint |
|---|---|---|
| Memory | 0a9fc92 |
load1=0.09 |
| Speed | 79937cc |
load1=0.21 |
Both runs used the dedicated quiet Linux x86_64 reference host (Intel Core
i7-6700HQ, 8 logical CPUs, Linux 7.1.3-arch1-2, Rust 1.97.1) and a single-slot
serialized queue (bench group, one slot).
This historical 1.5.0 memory snapshot was recorded before
CountingAllocator::realloc stopped double-counting growing reallocations;
heap byte metrics and speed timings are unaffected, and the current post-fix CI
compact baseline (including adotenv-compact-entries) is in
compact-memory.md.
Against the best pinned competitor in each values/load cell:
| Metric | Result |
|---|---|
| Speed | 25/25 strict wins |
| Retained heap | 20/20 non-empty strict wins; 10/10 empty ties |
| Peak heap | 30/30 strict wins |
| Allocation count | 30/30 strict wins |
No cell loses. Empty retained heaps are zero bytes for both compact values and the map-based reference, so a strict retained win is impossible there. The empty peak/allocation wins come from the competitors’ parsers allocating a container while the compact and map-based APIs allocate nothing.
For the non-empty memory cells, compact retained heap is 0.57-0.87 times the best competitor (median 0.76), peak heap is 0.08-0.82 times (median 0.49) and allocation count is 0.000086-0.14 times (median 0.0071). Speed is 0.16-0.78 times the best competitor (median 0.22).
This evaluation covers values and load memory and speed. The published
1.4.1 map-based comparison remains historical evidence:
- 25/25 speed wins
- 30/30 peak-heap wins
- 30/30 allocation wins
- 30/30 retained-heap ties, 0 losses
The compact API is the 1.5.0 minor-release addition. It is opt-in:
parse_values and load_values keep their existing map-based APIs.
Reproduce
Section titled “Reproduce”cargo run --release -p adotenv-xtask -- queue \ --host "$ADOTENV_BENCH_HOST" \ --remote-root "$ADOTENV_BENCH_ROOT" \ --out docs/benchmarks/compact-memory-1.5.0.jsonl \ --remote-out bench-compact-memory-1.5.0.jsonl \ --sizes 8,128,1k,10k,100k --shapes plain,long-line,empty \ --modes values,load --compact --sync
cargo run --release -p adotenv-xtask -- report \ --input docs/benchmarks/compact-memory-1.5.0.jsonl \ --out docs/benchmarks/compact-memory-1.5.0.md
cargo run --release -p adotenv-xtask -- queue-speed \ --host "$ADOTENV_BENCH_HOST" \ --remote-root "$ADOTENV_BENCH_ROOT" \ --out docs/benchmarks/speed-1.5.0.txt \ --remote-out bench-speed-1.5.0.txt --bench competitors --syncUse the same single-slot serialized queue as every other publication run. Do not bypass the shared queue.