Skip to content
Snippets Groups Projects
Commit ed21247b authored by Magomed Kostoev's avatar Magomed Kostoev Committed by Aleksandr Lyapunov
Browse files

box: mitigate the tuple.perftest gcc regression

Because of inlining rules some parts of comparators aren't optimized
properly by the gcc compiler, this causes a regression introduced by
the sort order implementation.

This patch introduces inline hints for the compiler in order to
mitigate the regression.

perf/tuple.cc test results (RelWithDebInfo, time in nanoseconds):

                             Tiger Lake

gcc 11.4.0:

                             Base    After #8915      Patched
       tuple_tuple_compare   40.5    41.5 (+2.5%)     39.4 (-2.7%)
  tuple_tuple_compare_hint   43.0    33.5 (-22.1%)    35.9 (-16.5%)

clang 14.0.0:

                             Base    After #8915      Patched
       tuple_tuple_compare   25.7    25.1 (-2.3%)     25.7
  tuple_tuple_compare_hint   33.1    32.5 (-1.8%)     33.1

                                Zen 3

gcc 11.4.0:

                             Base    After #8915      Patched
       tuple_tuple_compare   18.9    22.85 (+20.9%)   19.4 (+2.6%)
  tuple_tuple_compare_hint   24.25   22.95 (-5.4%)    23.5 (-3.1%)

clang 14.0.0:

                             Base    After #8915      Patched
       tuple_tuple_compare   17.3    17.0 (-1.7%)     17.0 (-1.7%)
  tuple_tuple_compare_hint   20.3    20.1 (-1.0%)     20.1 (-1.0%)

Closes #9216

NO_DOC=no code modification
NO_TEST=no code modification
NO_CHANGELOG=no code modification
parent 61fbb31a
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment