Skip to content

nedzadarek/Red-Memoi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Memoization for the Red (prototype)

Info:

Memoization is

or memoisation is an optimization technique used primarily to speed up computer programs by storing the results of expensive function calls

Usage:

See the tests directory.

Structure of the cache:

The cache is stored in the block. Keys are paren! type and values can have any Red's type.
The order of the call (fun/baz/bar vs fun/bar/baz) doesn't matter.
Examples (function call -> key; foo: func [a b /baz c /bar d][]):

foo 1 2 -> (1 2)
foo/baz 1 2 3 -> (1 2 /baz 3)
foo/baz/bar 1 2 3 4 -> (1 2 /baz 3 /bar 4)
foo/bar/baz 1 2 3 4 -> (1 2 /baz 4 /bar 3)

License:

See license.md.

About

Memoization for the Red programming language

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages