2. (Performance Testing) We examine the code in Section 12.2 with a view to improving its run-time...
Question:
2. (Performance Testing)
We examine the code in Section 12.2 with a view to improving its run-time performance.
Answer the following questions by writing code to compare the performance of candidate solutions:
a) The sum of the elements in row n versus the nth power of 2.
b) Computing the binomial coefficients using Boost C++ Math Toolkit versus lookup in Pascal’s triangle.
c) Computing the Fibonacci sequence by using elements in Pascal’s triangle versus the formulae in equations (12.3) and (12.4).
You can use the C++11 chrono library or the stopwatch class from Chapter 10 to measure the performance.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: