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.
Last edit: B.N. 2016-08-01
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
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.
Regards
Oliver
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.
Last edit: B.N. 2016-08-01