Read this question this question regarding the proper use of
inline
. If you get very similar results between the two Fibonacci functions, this may explain it.Instead of abbreviating one function to
fib()
, name itinline_fibonacci()
or something similar. It'll at least make the function calls less-confusing.timedFibonacci()
seems to be doing a little too much. Consider returning the final times and havingmain()
print them.If you won't need those commented-out lines, then remove them. Don't clutter the code.
Since the times are in
double
, it's not very likely that you'll get the exact same times.
Read this question regarding the proper use of
inline
. If you get very similar results between the two Fibonacci functions, this may explain it.Instead of abbreviating one function to
fib()
, name itinline_fibonacci()
or something similar. It'll at least make the function calls less-confusing.timedFibonacci()
seems to be doing a little too much. Consider returning the final times and havingmain()
print them.If you won't need those commented-out lines, then remove them. Don't clutter the code.
Since the times are in
double
, it's not very likely that you'll get the exact same times.
Read this question regarding the proper use of
inline
. If you get very similar results between the two Fibonacci functions, this may explain it.Instead of abbreviating one function to
fib()
, name itinline_fibonacci()
or something similar. It'll at least make the function calls less-confusing.timedFibonacci()
seems to be doing a little too much. Consider returning the final times and havingmain()
print them.If you won't need those commented-out lines, then remove them. Don't clutter the code.
Since the times are in
double
, it's not very likely that you'll get the exact same times.
Read this question regarding the proper use of
inline
. If you get very similar results between the two Fibonacci functions, this may explain it.Instead of abbreviating one function to
fib()
, name itinline_fibonacci()
or something similar. It'll at least make the function calls less-confusing.timedFibonacci()
seems to be doing a little too much. Consider returning the final times and havingmain()
print them.If you won't need those commented-out lines, then remove them. Don't clutter the code.
Since the times are in
double
, it's not very likely that you'll get the exact same times.