llvm-capstone/libcxx/benchmarks
Louis Dionne 1a5af34e6f
[libc++] Speed up classic locale (take 2) (#73533)
Locale objects use atomic reference counting, which may be very
expensive in parallel applications. The classic locale is used by
default by all streams and can be very contended. But it's never
destroyed, so the reference counting is also completely pointless on the
classic locale. Currently ~70% of time in the parallel stringstream
benchmarks is spent in locale ctor/dtor. And the execution radically
slows down with more threads.

Avoid reference counting on the classic locale. With this change
parallel benchmarks start to scale with threads.

This is a re-application of f8afc53d64 (aka PR #72112) which was
reverted in 4e0c48b907 because it broke the sanitizer builds due
to an initialization order fiasco. This issue has now been fixed by
ensuring that the locale is constinit'ed.

Co-authored-by: Dmitry Vyukov <dvyukov@google.com>
2023-11-29 09:31:05 -05:00
..
algorithms [libc++] Optimize for_each for segmented iterators 2023-11-14 23:55:24 +01:00
libcxxabi [libc++abi] Refactor around __dynamic_cast 2023-09-08 11:47:24 -04:00
algorithms.partition_point.bench.cpp [libc++][NFC] Apply clang-format on large parts of the code base 2023-06-19 11:19:51 -04:00
allocation.bench.cpp [libc++] Fix minor warnings in libcxx benchmarks 2023-09-13 17:05:56 -04:00
CartesianBenchmarks.h [libc++][NFC] Apply clang-format on large parts of the code base 2023-06-19 11:19:51 -04:00
CMakeLists.txt [libc++] Optimize for_each for segmented iterators 2023-11-14 23:55:24 +01:00
ContainerBenchmarks.h [libc++] Optimize vector push_back to avoid continuous load and store of end pointer 2023-10-02 09:12:37 -04:00
deque_iterator.bench.cpp
deque.bench.cpp Reapply "[libc++][ranges] Add benchmarks for the from_range constructors of vector and deque." (#67753) 2023-09-29 10:27:20 -04:00
filesystem.bench.cpp [libc++] Properly guard std::filesystem with >= C++17 (#72701) 2023-11-28 18:41:59 -05:00
format_to_n.bench.cpp [libc++][NFC] Apply clang-format on large parts of the code base 2023-06-19 11:19:51 -04:00
format_to.bench.cpp [libc++][NFC] Apply clang-format on large parts of the code base 2023-06-19 11:19:51 -04:00
format.bench.cpp
formatted_size.bench.cpp
formatter_float.bench.cpp [libc++][NFC] Apply clang-format on large parts of the code base 2023-06-19 11:19:51 -04:00
formatter_int.bench.cpp [libc++][NFC] Apply clang-format on large parts of the code base 2023-06-19 11:19:51 -04:00
function.bench.cpp [libc++][NFC] Apply clang-format on large parts of the code base 2023-06-19 11:19:51 -04:00
GenerateInput.h Use hash value checks optimizations consistently 2023-07-04 21:01:08 +02:00
join_view.bench.cpp
lexicographical_compare_three_way.bench.cpp
lit.cfg.py
lit.site.cfg.py.in
map.bench.cpp [libc++][NFC] Apply clang-format on large parts of the code base 2023-06-19 11:19:51 -04:00
monotonic_buffer.bench.cpp [libc++] Fix minor warnings in libcxx benchmarks 2023-09-13 17:05:56 -04:00
ordered_set.bench.cpp [libc++][NFC] Apply clang-format on large parts of the code base 2023-06-19 11:19:51 -04:00
random.bench.cpp [libc++][NFC] Apply clang-format on large parts of the code base 2023-06-19 11:19:51 -04:00
std_format_spec_string_unicode.bench.cpp
stop_token.bench.cpp [libc++][test] Add stop_token benchmark (#69117) 2023-10-16 21:49:37 +01:00
string.bench.cpp [libc++][NFC] Apply clang-format on large parts of the code base 2023-06-19 11:19:51 -04:00
stringstream.bench.cpp [libc++] Speed up classic locale (take 2) (#73533) 2023-11-29 09:31:05 -05:00
system_error.bench.cpp [libc++] Optimize internal function in <system_error> 2023-08-11 13:08:45 -07:00
to_chars.bench.cpp
unordered_set_operations.bench.cpp [libc++] Add test coverage for unordered containers comparison (#66692) 2023-09-21 05:11:49 -04:00
util_smartptr.bench.cpp
Utilities.h [libc++][NFC] Apply clang-format on large parts of the code base 2023-06-19 11:19:51 -04:00
variant_visit_1.bench.cpp
variant_visit_2.bench.cpp
variant_visit_3.bench.cpp
VariantBenchmarks.h [libc++][NFC] Apply clang-format on large parts of the code base 2023-06-19 11:19:51 -04:00
vector_operations.bench.cpp [libc++] Optimize vector push_back to avoid continuous load and store of end pointer 2023-10-02 09:12:37 -04:00