Snippets tagged memoization

  • Memoization and Tail Recursive Function

    Hi, I expressed Memoization and Memoization Tail Recursive on the functions. I hope something useful.

    22 people like this

    Posted: 6 years ago by zecl

  • memoizeBy

    Sometimes you might wish to memoize a function whose input doesn't have the equality and comparison constraints, or maybe the comparison of your given type is just too slow for what you need. To fix this, you simply provide a function which converts the input into something more fitting as an extra parameter.

    7 people like this

    Posted: 6 years ago by Rick Minerich

  • A parametric fixpoint combinator

    Writing functions that recursively generate lambdas from a given parameter is a useful practice, but things get trickier when you need the output functions themselves to be mutually recursive. This is my attempt at creating a fix-point combinator that transparently handles this requirement. It also gives memoization for free as a side-effect.

    7 people like this

    Posted: 4 years ago by Eirik Tsarpalis

  • Concurrent Memoization

    This is more generic variant of http://www.fssnip.net/c4 if you want to memoize over different functions / code paths that calls the same to-be-cached-code.

    5 people like this

    Posted: 1 years ago by Tuomas Hietanen

  • From Löb's Theorem to Spreadsheet Evaluation (memoized)

    From Löb's Theorem to Spreadsheet Evaluation (memoized), based on http://blog.sigfpe.com/2006/11/from-l-theorem-to-spreadsheet.html

    2 people like this

    Posted: 5 months ago by NIck Palladinos