GoingNative 31: Easy Parallelization with Parallel STL

Sign in to queue

The Discussion

  • User profile image
    Norbert

    Hi,
    I'd like to know if it is possible to get the implementation of the measure_time utility Artur is using. I have my own one (more precise than 1/1000 sec using Windows multimedia timers, not std::chrono), but since I'm only a "hobbyist programmer" I'd still like to see how a "Pro" implements a function like that. One that measures correctly if parallelism is involved - where mine might probably measure incorrectly since it wasn't designed with parallelism in mind. Thank you,
    Norbert

  • User profile image
    Artur Laksberg

    @Norbert: You can find the implementation here.

    To get reliable results, you need to perform multiple runs, preferably on different types of hardware. The variance is usually more significant than the precision of the timer, so measuring small differences in performance comes down to probability and statistics. We've found Student's t-test to be useful for measuring the difference between the sets of runs.

Add Your 2 Cents