darling-libcxx/benchmarks
Eric Fiselier 6cebf7c36f Improve codegen for deque.
This patch rewrites a few loops in deque and split_buffer to better
optimize the codegen. For constructors like
`deque<unsigned char> d(500000, 0);` this patch results in a 2x speedup.

The patch improves the codegen  in roughly three ways:

1. Changes do { ... } while (...) loops into more typical for loops.
  The optimizer can reason about normal looking loops better.

2. Split the iteration over a range into (A) iteration over the blocks,
then (B) iteration within the block. This nested structure helps LLVM
lower the inner loop to `memset`.

3. Do fewer things each iteration. Some of these loops were incrementing
  or changing 4-5 variables every loop (in addition to the
  construction). Previously most loops would increment the end pointer,
  the size, and decrement the count of remaining items to construct.
  Now we only increment a single pointer for most iterations.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@368547 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-12 07:51:05 +00:00
..
algorithms.bench.cpp Add benchmarks for sorting and heap functions. 2018-11-20 17:15:17 +00:00
algorithms.partition_point.bench.cpp [libcxx] Speeding up partition_point/lower_bound/upper_bound 2018-12-17 16:04:39 +00:00
allocation.bench.cpp Add benchmarks to test the cost of allocator 2019-08-02 21:13:38 +00:00
CartesianBenchmarks.hpp Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
CMakeLists.txt Add benchmarks to test the cost of allocator 2019-08-02 21:13:38 +00:00
ContainerBenchmarks.hpp Improve codegen for deque. 2019-08-12 07:51:05 +00:00
deque.bench.cpp Improve codegen for deque. 2019-08-12 07:51:05 +00:00
filesystem.bench.cpp Implement filesystem NB comments, relative paths, and related issues. 2018-04-02 23:03:41 +00:00
function.bench.cpp Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
GenerateInput.hpp Implement filesystem NB comments, relative paths, and related issues. 2018-04-02 23:03:41 +00:00
lit.cfg.py Rename cxx-benchmark-unittests target and convert to LIT. 2018-11-14 20:38:46 +00:00
lit.site.cfg.py.in Rename cxx-benchmark-unittests target and convert to LIT. 2018-11-14 20:38:46 +00:00
ordered_set.bench.cpp Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
string.bench.cpp Add more benchmarks for literal strings. 2019-04-03 17:40:51 +00:00
stringstream.bench.cpp Add test macros for always_inline and noinline 2018-10-10 18:22:23 +00:00
unordered_set_operations.bench.cpp Add test macros for always_inline and noinline 2018-10-10 18:22:23 +00:00
util_smartptr.bench.cpp Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
Utilities.hpp Improve codegen for deque. 2019-08-12 07:51:05 +00:00
vector_operations.bench.cpp Fix PR35637: suboptimal codegen for vector<unsigned char>. 2019-07-28 04:37:02 +00:00