micro-memoize - A tiny, crazy fast memoization library for the 95% use-case

  •        3

As the author of moize, I created a consistently fast memoization library, but moize has a lot of features to satisfy a large number of edge cases. micro-memoize is a simpler approach, focusing on the core feature set with a much smaller footprint (~1.0kB minified+gzipped). Stripping out these edge cases also allows micro-memoize to be faster across the board than moize. Custom method to compare equality of keys, determining whether to pull from cache or not, by comparing each argument in order.

https://github.com/planttheidea/micro-memoize#readme

Tags
Implementation
License
Platform

   




Related Projects

memoizee - Complete memoize/cache solution for JavaScript

  •    Javascript

Originally derived from es5-ext package. memoize name was already taken, therefore project is published as memoizee on NPM.

lru-memoize - A utility to provide LRU memoization for any js function

  •    Javascript

lru-memoize is a utility to provide simple memoization for any pure javascript function, using an LRU cache that prioritizes the most recently accessed values, and discards the "least recently used" (LRU) items when the size limit is reached. If your function has side effects or relies on some external state to generate its result, it should not be memoized. Let's look at an example where we want to memoize a function that multiplies three numbers together, and we want to keep the last ten arguments -> value mappings in memory.

moize - The consistently-fast, complete memoization solution for JS

  •    Javascript

moize is a consistently blazing fast memoization library for JavaScript. It handles multiple parameters (including default values) without any additional configuration, and offers a large number of options to satisfy any number of potential use-cases. All parameter types are supported, including circular objects, functions, etc. There are also a number of shortcut methods to memoize for unique use-cases.

memoize-one - A memoization library which only remembers the latest invocation

  •    Javascript

A memoization library that only caches the result of the most recent arguments. There are only two hard things in Computer Science: cache invalidation and naming things.


Apache Geode - Distributed, In-memory Database for Scale-Out Applications

  •    Java

Apache Geode is distributed, in-memory database for scale-out applications. All data is stored in-memory for low latency. Performance scales linearly as nodes are added. Data is distributed automatically between nodes to optimize performance. Clusters fail-over to other nodes in case of failures, and rebalance remaining resources. Geode servers can be configured to talk memcached protocol.

memcached - A fully featured Memcached client build on top of Node

  •    Javascript

memcached is a fully featured Memcached client for Node.js. memcached is built with scaling, high availability and exceptional performance in mind. We use consistent hashing to store the data across different nodes. Consistent hashing is a scheme that provides a hash table functionality in a way that adding or removing a server node does not significantly change the mapping of the keys to server nodes. The algorithm that is used for consistent hashing is the same as libketama. There are different ways to handle errors for example, when a server becomes unavailable you can configure the client to see all requests to that server as cache misses until it goes up again. It's also possible to automatically remove the affected server from the consistent hashing algorithm or provide memcached with a failover server that can take the place of the unresponsive server.

Apache Mnemonic - Non-volatile hybrid memory storage oriented library

  •    Java

Apache Mnemonic is a non-volatile hybrid memory storage oriented library, it proposed a non-volatile/durable Java object model and durable computing service that bring several advantages to significantly improve the performance of massive real-time data processing/analytics. developers are able to use this library to design their cache-less and SerDe-less high performance applications.

identity_cache - IdentityCache is a blob level caching solution to plug into ActiveRecord

  •    Ruby

Opt in read through ActiveRecord caching used in production and extracted from Shopify. IdentityCache lets you specify how you want to cache your model objects, at the model level, and adds a number of convenience methods for accessing those objects through the cache. Memcached is used as the backend cache store, and the database is only hit when a copy of the object cannot be found in Memcached.IdentityCache keeps track of the objects that have cached indexes and uses an after_commit hook to expire those objects, and any up the tree, when they are changed.

Memcached - distributed object caching system

  •    C

Memcached is high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.

nodecache - a node internal caching module

  •    CoffeeScript

A simple caching module that has set, get and delete methods and works a little bit like memcached. Keys can have a timeout (ttl) after which they expire and are deleted from the cache. All keys are stored in a single object so the practical limit is at around 1m keys. Since 4.1.0: Key-validation: The keys can be given as either string or number, but are casted to a string internally anyway. All other types will either throw an error or call the callback with an error.

LazyCache - An easy to use thread safe generics based in memory caching service with a simple developer friendly API for c#

  •    CSharp

Lazy cache is a simple in-memory caching service. It has a developer friendly generics based API, and provides a thread safe cache implementation that guarantees to only execute your cachable delegates once (it's lazy!). Under the hood it leverages Microsoft.Extensions.Caching and Lazy to provide performance and reliability in heavy load scenarios. As you can see the magic happens in the GetOrAdd() method which gives the consumer an atomic and tidy way to add caching to your code. It leverages a factory delegate Func and generics to make it easy to add cached method calls to your app.

nitro - A high performance in-memory index storage engine

  •    Go

A high performance in-memory key-value item storage engine written in golang. The storage engine is based lock-free data structures and scales well with multicore CPUs.

VelocityNuke

  •    

This project is a DotNetNuke Cache Provider supporting the newly announced Velocity cache platform from Microsoft. “Velocity” is a distributed in-memory application cache platform for developing scalable, available, and high-performance applications. “Velocity” fuses memory a...

gcache - Cache library for golang. It supports expirable Cache, LFU, LRU and ARC.

  •    Go

Cache library for golang. It supports expirable Cache, LFU, LRU and ARC.Supports expirable Cache, LFU, LRU and ARC.

MapDB - Embedded Database Engine

  •    Java

MapDB is an embedded database engine. It provides Maps and other collections backed by disk or memory storage. It offers excellent performance comparable to java collections, but is not limited by GC overhead. It is also a full database engine with storage backends, transactions, cache algorithms, expiration and many other options. MapDB provides concurrent Maps, Sets and Queues backed by disk storage or off-heap memory.

FASTER - Fast key-value store from Microsoft Research

  •    CSharp

Managing large application state easily and with high performance is one of the hardest problems in the cloud today. We present FASTER, a new concurrent key-value store designed for point lookups and heavy updates. FASTER supports data larger than memory, by leveraging fast external storage. What differentiates FASTER are its cache-optimized index that achieves very high performance — up to 160 million operations per second when data fits in memory; its unique “hybrid record log” design that combines a traditional persistent log with in-place updates, to shape the memory working set and retain performance; and its architecture as an component that can be embedded in cloud apps. FASTER achieves higher throughput than current systems, by more than two orders of magnitude, and scales better than current pure in-memory data structures, for in-memory working sets. FASTER also offers a new consistent recovery scheme that achieves better performance at the expense of slightly higher commit latency. Go to our website for more details and papers.

Hazelcast Jet - A general purpose distributed data processing engine, built on top of Hazelcast.

  •    Java

Hazelcast Jet is a distributed computing platform built for high-performance stream processing and fast batch processing. It embeds Hazelcast In-Memory Data Grid (IMDG) to provide a lightweight, simple-to-deploy package that includes scalable in-memory storage. Hazelcast Jet performs parallel execution to enable data-intensive applications to operate in near real-time.

noria - Dynamically changing, partially-stateful data-flow for web application backends.

  •    Rust

Noria is a new streaming data-flow system designed to act as a fast storage backend for read-heavy web applications based on this paper from OSDI'18. It acts like a database, but precomputes and caches relational query results so that reads are blazingly fast. Noria automatically keeps cached results up-to-date as the underlying data, stored in persistent base tables, change. Noria uses partially-stateful data-flow to reduce memory overhead, and supports dynamic, runtime data-flow and query change. At a high level, Noria takes a set of parameterized SQL queries (think prepared statements), and produces a data-flow program that maintains materialized views for the output of those queries. Reads now become fast lookups directly into these materialized views, as if the value had been directly cached in memcached. The views are then kept up-to-date incrementally through the data-flow, which yields high write throughput.