Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Benchmark dashboard

Reference host: kbench, Intel Core i7-6700HQ, 4 cores and 8 threads, 2.6 GHz, 15 GiB RAM, rustc 1.97.0. Tests were pinned to one CPU.

Method and budgets are in performance.md and benchmark-plan.md. Full comparison tables are in competitive-analysis.md.

Raw data:

Simple fixture

65,536 declarations:

ImplementationWallInstructionsRetained
adotenv parse33.3 ms207M26.5 MB
adotenv parse + map40.9 ms277M14.2 MB
dotenv-compat50.3 ms271M14.5 MB
dotenvy + map69.5 ms361M11.4 MB
dotenv-ng94.5 ms384M20.3 MB
dotenv-parser163.9 ms1,243M10.6 MB

Mixed fixture

ImplementationWallInstructionsRetained
adotenv parse20.6 ms106M11.0 MB
adotenv parse + map27.6 ms153M5.8 MB
dotenv-compat17.7 ms108M4.8 MB

Real-world corpus

Pinned public configurations, repeated with unique key prefixes.

ImplementationWallInstructionsRetained
adotenv parse9.4 ms63M4.2 MB
adotenv parse + map11.2 ms78M2.4 MB
dotenv-compat7.8 ms56M2.0 MB

Loader profiles

ProfileWallInstructionsRetained
Values only54.9 ms366M9.9 MB
Default73.9 ms465M27.9 MB
Full reports120.1 ms687M37.7 MB

Dialects

Adotenv only, 65,536 declarations:

DialectWallInstructionsRetained
Portable33.3 ms207M26.5 MB
Node60.6 ms423M14.3 MB
Python50.6 ms329M14.3 MB
Compose51.7 ms305M14.2 MB
Docker42.7 ms269M14.3 MB

Adotenv-only operations

65,536-entry workloads:

OperationTime
native set61.7 ms
native batch63.6 ms
format normalize76.7 ms
sort161.1 ms
compare large versus typical61.0 ms

Build and startup

Clean release builds on kbench:

BinaryBuildStripped sizeStartup
adotenv46.6 s454 KB651 us
dotenv-compat45.0 s367 KB664 us
dotenvy45.2 s386 KB660 us
dotenv-ng45.1 s404 KB661 us
dotenv-parser45.7 s450 KB698 us
adotenv-cli16.8 s1,199 KB653 us

Feature-set library sizes:

FeaturesBuildLibrary
alloc11.9 s2,616 KB
std11.9 s2,616 KB
load13.2 s3,111 KB
serde14.8 s2,789 KB
load + serde16.2 s3,324 KB
exec12.1 s2,654 KB

Current conclusions

  • adotenv is fastest on simple parse and map building.
  • dotenv-compat is faster on mixed and real-world map building because it returns an unordered map and does not retain the lossless document model.
  • adotenv uses the lowest instructions for simple parsing and keeps default loading below 30 MB retained.
  • The parse-only binary is about 24 percent larger than the smallest measured parser.