Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Benchmark

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.

Node.js

  • 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

Bun

  • 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

Deno

  • ES Modules
# Time:
  lru.min:    222.60ms
  lru-cache:  227.80ms

Deno benchmarks were carried out without an isolated process.


Running

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