[PATCH] D53978: Add benchmarks for sorting and heap functions.
Eric Fiselier via Phabricator
reviews at reviews.llvm.org
Fri Nov 16 09:24:33 PST 2018
EricWF added a comment.
In https://reviews.llvm.org/D53978#1283922, @mclow.lists wrote:
> Is there any value in breaking these out into one benchmark per file? I can see this file ever-growing as we add new benchmarks.
I don't thin so. If you want to run a single benchmark in a file, you can use `--benchmark_filter=<regex>` to select it.
Otherwise, this LGTM.
================
Comment at: benchmarks/algorithms.bench.cpp:327
+ makeCartesianProductBenchmark<Sort, AllValueTypes, AllOrders>(Quantities);
+ makeCartesianProductBenchmark<StableSort, AllValueTypes, AllOrders>(
+ Quantities);
----------------
For stable sort we want to explore more input sizes between `1` and `200`. Currently stable sort is adaptive on the input size, switching to insertion sort for inputs smaller than `128`. This seems to cause us to perform 2x worse for inputs of 100 elements. Early experiments show we perform better when the switch is around `16` to `32` elements, but we should have some coverage to prove it.
Repository:
rCXX libc++
https://reviews.llvm.org/D53978
More information about the libcxx-commits
mailing list