Performance Benchmarks
mainmicro-memoize is highly optimized for performance, particularly in scenarios involving multiple parameters. In benchmarks performed with tinybench on NodeJS 24.15.0, micro-memoize consistently outperformed other libraries like lru-memoize, fast-memoize, lodash, and ramda across various parameter types (primitives, arrays, and objects).
Key performance characteristics:
- Multiple Parameter Support: Unlike
underscore,lodash, andramda,micro-memoizesupports multiple-parameter memoization natively without requiring a customresolver(e.g.,JSON.stringify). - High Throughput: Consistently achieves high operations per second (ops/sec) across single and multiple argument patterns.