The benchmark is performed by comparing 1,000,000 runs through a maximum cache limit of 100,000, getting 333,333 caches and deleting 200,000 keys 10 consecutive times, clearing the cache every run.
- lru-cache
v11.0.0
- ES Modules
# Time:
lru.min: 240.45ms
lru-cache: 258.32ms
# CPU:
lru.min: 275558.30µs
lru-cache: 306858.30µs- CommonJS
# Time:
lru.min: 242.86ms
lru-cache: 264.30ms
# CPU:
lru.min: 280118.00µs
lru-cache: 310327.20µs- ES Modules
# Time:
lru.min: 298.42ms
lru-cache: 359.23ms
# CPU:
lru.min: 401869.50µs
lru-cache: 510357.60µs- CommonJS
# Time:
lru.min: 324.41ms
lru-cache: 370.22ms
# CPU:
lru.min: 396790.50µs
lru-cache: 488574.50µs- ES Modules
# Time:
lru.min: 222.60ms
lru-cache: 227.80msDeno benchmarks were carried out without an isolated process.
To run the benchmark tests, follow these steps in the ./lru.min directory:
npm ci
npm run build
npm run benchmark:esm
npm run benchmark:cjs