The Google microbenchmark library supports estimating complexity of an algorithm but everything is expressed by telling the framework what the size of your N
is. I'm curious what the best way to represent M+N
algorithms in this framework is. In my test I go over a cartesian product of M & N values in my test.
Do I call SetComplexityN
with M+N
(& for O(MN)
algorithms I assumed SetComplexityN
is similarly M*N
)? If I wanted to hard-code the complexity of the algorithm (vs doing best fit) does benchmark::oN
then map to M+N
and benchmark::oNSquared
maps to O(MN)
?