Skip to content

Tim7775/luau-caching-and-memoization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI

luau-caching-and-memoization

Most packages are pure Luau, some require Roblox's task library (a polyfill is available here). Roblox-ts type declaration files and npm packages are available for memoizeFrame, memoizeMulti, memoizeMultiAsync and memoizeRecentlyUsed.

Memoization Functions (documentation)

Module Dependency Description
memoize memoize = "tim7775/memoize@0.1.0" Memoize function calls
memoizeAsync memoizeAsync = "tim7775/memoize-async@0.1.0" Memoize async function calls
memoizeFrame memoizeFrame = "tim7775/memoize-frame@0.1.1" Memoize function calls for a single frame
memoizeMulti memoizeMulti = "tim7775/memoize-multi@0.1.1" Memoize function calls with multiple parameters and return values
memoizeMultiAsync memoizeMultiAsync = "tim7775/memoize-multi-async@0.1.1" Memoize async function calls with multiple parameters and return values
memoizeRecentlyUsed memoizeRecentlyUsed = "tim7775/memoize-recently-used@0.1.1" Memoization function with a least-recently-used cache eviction policy

Caches

Module Dependency Description
HLRUCache HLRUCache = "tim7775/hlru-cache@0.1.0" A faster and simpler LRU cache that may be slightly less memory efficient
LRUCache LRUCache = "tim7775/lru-cache@0.1.0" Cache with a least-recently-used cache eviction policy
MultiCache MultiCache = "tim7775/multi-cache@0.1.1" Cache that stores any number of values in one entry and accepts keys consisting of multiple values
NMRURRCache NMRURRCache = "tim7775/nmru-rr-cache@0.1.0" Not-most-recently-used random replacement cache
RRCache RRCache = "tim7775/rr-cache@0.1.0" Random replacement cache