[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Robust timings in unit tests
From: |
Greg Chicares |
Subject: |
Re: [lmi] Robust timings in unit tests |
Date: |
Thu, 11 May 2017 16:26:17 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 2017-05-11 14:57, Greg Chicares wrote:
[...]
> 'expression_template_0_test' [...] I had once set great store by its
> results, though that was probably with gcc-3.0 on a one-core 3.5 GHz
> CPU...because now there's no difference to measure on x64_86-linux-gnu
> except for the "STL" methods that are known to be awful:
>
> Speed tests: array length 1000
> C : 9.877e-07 s mean; 0 us least of 10125 runs
> STL plain : 4.006e-06 s mean; 3 us least of 2496 runs
> STL fancy : 1.462e-06 s mean; 1 us least of 6840 runs
> valarray : 9.952e-07 s mean; 0 us least of 10048 runs
> uBLAS : 1.020e-06 s mean; 0 us least of 9801 runs
> PETE : 8.727e-07 s mean; 0 us least of 11459 runs
>
> ..and the corresponding results for array lengths of {1, 10, 100} just
> look ridiculous now: they're all zero.
An upcoming commit will run each of those one thousand times, so that
results become as meaningful again as they were about two decades ago,
e.g.:
Speed tests: array length 10
C : 9.690e-06 s mean; 9 us least of 1032 runs
STL plain : 6.873e-05 s mean; 68 us least of 146 runs
STL fancy : 1.823e-05 s mean; 18 us least of 549 runs
valarray : 1.029e-05 s mean; 10 us least of 972 runs
uBLAS : 4.186e-05 s mean; 41 us least of 239 runs
PETE : 9.824e-06 s mean; 9 us least of 1018 runs
...
Speed tests: array length 1000
C : 7.056e-04 s mean; 704 us least of 100 runs
STL plain : 2.997e-03 s mean; 2967 us least of 100 runs
STL fancy : 1.164e-03 s mean; 1155 us least of 100 runs
valarray : 7.251e-04 s mean; 722 us least of 100 runs
uBLAS : 7.731e-04 s mean; 763 us least of 100 runs
PETE : 7.244e-04 s mean; 720 us least of 100 runs