udacity / fcnd-issue-reports

You can use this repository to file issue reports with the Flying Car Nanodegree content.
1 stars 4 forks source link

Lesson 3.5 From Grids to Graphs: Collinearity benchmark #371

Open 4e6 opened 5 years ago

4e6 commented 5 years ago

Benchmark in the collinearity exercise should include some kind of warmup to show the correct execution time.

Issue

Here I time two identical collinearity_float calls and the first one is always about 5 times slower.

2018-07-19-172312_1106x562_scrot

It is not the case with the warmup phase:

2018-07-19-172335_1105x557_scrot

Correct benchmark

Benchmark with warmup phase shows correct ratio for collinearity_float vs collinearity_int -- float arithmetic is only 2 times slower instead of 8

2018-07-19-172420_1109x562_scrot 2018-07-19-172438_1111x559_scrot