In continuation of the article Memoization in the D Programming Language, this article describes new features of my D library memoize-dlang.
I remind that memoization is automatically not calling a function again when called with the same parameters (usually to reduce the amount of computations).
memoize
is the same as memoize
from std.functional
module from standard library Phobos (implemented differently in some very little details, namely using string mixins (autogenerated code) to implement all of memoize
, noLockMemoize
, synchronizedMemoize
(see below) based on a common template). memoize
template without maxSize
argument is implemented in a quite simple way (see below). memoize
with maxSize
argument is implemented in a rather comple