On Monday, 19 May 2014 at 01:19:29 UTC, Jonathan M Davis via
Digitalmars-d wrote:
It's already so rare that memoization of a function call can
occur, that I'm
pretty much convinced that memoization is useless as an
optimization - at
least as long as the compiler is doing it. After all, how often
does a
function get called with same the arguments within a single
function let alone
a single expression (and as I understand it, memoization only
ever occurs at
this point within either a single expression or statement - I
don't remember
which - but regardless, it's not even within a whole function)?
Memoization is valid throughout the program. Opportunities occur
frequently with generic programming and inlining.
Regardless, we should error on the side of not memoizing in
order to avoid
Then you don't need strict pure functions.