mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-01 05:37:59 +02:00
[perf] Change the order of slowdowns.
More the large slowdowns to the end. This has two pleasing effects:
1. There is symmetry between large speedups at the top, and large
slowdowns at the bottom, with long bars -> short bars -> long bars.
2. After a cairo-perf-diff run the largest slowdowns are immediately
visible on the console. What better way to flag performance
regressions?
This commit is contained in:
parent
877ed645f9
commit
ce8a8424aa
1 changed files with 7 additions and 4 deletions
|
|
@ -60,12 +60,15 @@ test_diff_cmp_speedup_before_slowdown (const void *a, const void *b)
|
|||
if (a_diff->change < 1.0 && b_diff->change > 1.0)
|
||||
return 1;
|
||||
|
||||
/* Reverse sort by magnitude of change so larger changes come
|
||||
* first */
|
||||
if (fabs (a_diff->change) > fabs (b_diff->change))
|
||||
if (a_diff->change == b_diff->change)
|
||||
return 0;
|
||||
|
||||
/* Large speedups come first. */
|
||||
if (a_diff->change > 1. && a_diff->change > b_diff->change)
|
||||
return -1;
|
||||
|
||||
if (fabs (a_diff->change) < fabs (b_diff->change))
|
||||
/* Large slowdowns come last. */
|
||||
if (a_diff->change < 1. && a_diff->change < b_diff->change)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue