Benchmark I

This section will give a comparison of sequential vs parallel computing using Run and Measure.

Finally, we can see the performance of the new algorithms.

Let’s have a look at an example where we execute separate tasks on each element - using std::transform. In that example, the speed up vs the sequential version should be more visible.

When comparing the parallel and serial execution time for the transform function using Benchmark I, the results sometimes indicate that parallel execution takes more time than serial execution. The examples in this course use a machine with single hardware Hyper-thread with 3.75 GB of memory. You can disregard this unexpected result; on a traditional CPU, that usually has several hardware threads, parallel execution times would be lower than serial ones.

Get hands-on with 1400+ tech skills courses.