If you want to obtain some kind of a measurement or estimate of the performance gain due to memoization, perhaps you could, if possible, set up one or more scenarios (i.e. a particular graph specifically made for this purpose), where you can first do a "warmup run" that makes sure everything that can be memoized is memoized, and then you do your benchmark. You'd still have to interpret the results and figure out how to generalize them to other scenarios, but maybe you can come up with a test scenario/graph that allows you to do that.
↧