Skip to content

Memoize last value #7

Description

@cstjean

One of my favorite light-weight memoization strategy is to just remember the result of the last call. Basically

function foo(a,b,c)
    if (a,b,c) === foo_last_args
        return foo_last_return_value
    else
        ... compute and store
    end
end

It solves the problem of the ever-growing dictionary, since only one value is stored. Are you interested in an implementation for this package?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions