From the course: Parallel and Concurrent Programming with C++ Part 2

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

 Measure speedup

Measure speedup - C++ Tutorial

From the course: Parallel and Concurrent Programming with C++ Part 2

Start my 1-month free trial

Measure speedup

- Amdahl's law is great for estimating the speedup that you might achieve by parallelizing a program, but once you've created that parallel program, it can be useful to actually measure its speedup empirically. Speedup is calculated as the ratio of two values, the time it takes for the program to execute sequentially divided by the time it takes to execute in its parallel implementation. That means we'll actually need to take two separate measurements to calculate speedup. First, we'll see how long the algorithm takes to execute with a single processor. Now, this doesn't mean just take the parallel version of the program and run it with only one processor, because the parallel program will include additional overhead that isn't necessary to run sequentially. We want to measure the best possible implementation of that algorithm written with sequential execution in mind. - I've got my stopwatch ready. Let's see how fast you…

Contents