Last night in #perl vhold and I got to talking about a module that automatically determined good memoization candidates and took the appropriate action.

I'm now seriously considering writing this module, but I'm having some trouble coming up with what should be memoized, as opposed to the Memoize docs which tell what shouldn't be memoized.

So Monks, I put it to you: what are measurable criteria for memoization? Memoizing everything that passes the don't memoize tests seems impractical, inefficent, and an overzealous application of memoization.

As an aside, I'm open to module name suggestions because I'm not too good at naming things...

Update Fixed typo in title

In reply to Good metrics for Memoization by Trizor

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.