# caiogondim/fast-memoize.js

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/caiogondim-fast-memoize-js).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

2,595 stars · 86 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/caiogondim/fast-memoize.js
- Homepage: https://npm.im/fast-memoize
- awesome-repositories: https://awesome-repositories.com/repository/caiogondim-fast-memoize-js.md

## Topics

`javascript` `js` `memoization`

## Description

Fast-memoize.js is a JavaScript memoization library that caches function return values for identical arguments to speed up expensive execution in JavaScript applications. It operates as a caching utility that stores and retrieves function outputs by serializing input parameters into unique keys.

The library optimizes execution through arity-based function specialisation, generating tailored internal call paths based on the expected number of arguments. It features deterministic argument serialization to convert complex and variadic input parameters into unique string keys for reliable cache lookups, alongside direct memory result caching for instant retrieval on subsequent identical calls.

Extensibility is supported through a pluggable serialization engine that enables custom transformation logic for non-primitive arguments, and a strategy-pattern cache abstraction that allows swapping the default storage implementation for custom backends. Functions containing rest and default arguments are handled when argument counts cannot be automatically resolved.

## Tags

### Data & Databases

- [In-Memory Function Caching Utilities](https://awesome-repositories.com/f/data-databases/disk-caching-systems/function-result-caching/in-memory-function-caching-utilities.md) — A high-speed caching library that stores and retrieves function outputs by serializing input arguments into unique keys.
- [Memoization Utilities](https://awesome-repositories.com/f/data-databases/expensive-result-caches/memoization-utilities.md) — Store the return values of expensive function calls alongside their arguments so subsequent identical calls return the cached output instantly without recalculating. ([source](https://github.com/caiogondim/fast-memoize.js#readme))
- [In-Memory Result Caches](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/caching-performance/caching-strategies/query-result-caching/method-result-caches/translation-result-caches/evaluation-result-caches/last-result-caches/in-memory-result-caches.md) — Stores function return values alongside serialised arguments for instant retrieval on subsequent identical calls without recalculation.

### Programming Languages & Runtimes

- [Memoization Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/javascript-utility-libraries/memoization-libraries.md) — A performance-optimized utility that caches function return values for identical arguments to speed up expensive execution in JavaScript applications.
- [Execution Wrappers](https://awesome-repositories.com/f/programming-languages-runtimes/class-method-definitions/arity-based-method-definitions/execution-wrappers.md) — Optimises execution speed by generating specialised internal call paths tailored to expected argument counts.
- [Deterministic Key Generation](https://awesome-repositories.com/f/programming-languages-runtimes/function-argument-passing/complex-data-arguments/deterministic-key-generation.md) — Converting intricate input arguments into deterministic string keys so functions with variadic or non-primitive parameters can be safely cached.

### Software Engineering & Architecture

- [Function Result Memoization](https://awesome-repositories.com/f/software-engineering-architecture/function-result-memoization.md) — Caching expensive function execution results in JavaScript applications to speed up repeated calls with identical arguments.

### Development Tools & Productivity

- [Argument Serializers](https://awesome-repositories.com/f/development-tools-productivity/project-configuration/automated-config-generation/deterministic-serialization/argument-serializers.md) — Converts complex and variadic input parameters into unique string keys to ensure reliable cache lookups.
