adonisjs / env

Framework agnostic environment variables parser and validator
https://docs.adonisjs.com/guides/environment-variables
MIT License
37 stars 10 forks source link

improvement: add realworld use case benchmarks #13

Closed thetutlage closed 4 years ago

thetutlage commented 4 years ago

Every test creates a new instance of Env and hence cache has literally no impact. I have created proper benchmarks using a single shared instance (that is how the real app will work) and the gains of caching are tremendous.

With Cache x 96,787,914 ops/sec ±0.29% (95 runs sampled)
Without Cache x 2,509,525 ops/sec ±0.69% (92 runs sampled)
Fastest is With Cache