I just wondered what happend in https://sourceforge.net/p/c-memo/code/ci/master/tree/MemoizationTests.c#l41, sure that it should not be a call to factorialMemoExample_Baseline ?
fac(100k) then takes way too long in the un-memo function.
50k is really demonstrating it with the following values:
Baseline was: 6.653030
Memoized was: 0.041390
Memoized2 was: 0.014152
Hope you read this, since i dont know how to make pull requests in Sourceforge.
I do see what you mean, it would reasonably be a call to factorialMemoExample_Baseline to do a completely unoptimized factorial to get a fully unoptimized version. If I recall, this baseline was actually intended to see the performance on the first time that each one was called (before being able to take advantage of any optimization, but still incurring the overhead a cache miss). It might make sense to have a baseline for both conditions and to improve the documentation.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.