[libcxx-commits] [libcxx] 15b9ee4 - [libc++] Drop char8_t instantiation from string benchmarks (#212283)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 28 09:48:25 PDT 2026


Author: Louis Dionne
Date: 2026-07-28T12:48:21-04:00
New Revision: 15b9ee4ee263e8c6c98e89ed7b33ff35cf540255

URL: https://github.com/llvm/llvm-project/commit/15b9ee4ee263e8c6c98e89ed7b33ff35cf540255
DIFF: https://github.com/llvm/llvm-project/commit/15b9ee4ee263e8c6c98e89ed7b33ff35cf540255.diff

LOG: [libc++] Drop char8_t instantiation from string benchmarks (#212283)

The string benchmarks instantiated every benchmark for char, char8_t and
wchar_t. char8_t exercises the same code paths as char, so drop it to
get roughly a 30% speedup on this benchmark time.

Added: 
    

Modified: 
    libcxx/test/benchmarks/containers/string.bench.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/test/benchmarks/containers/string.bench.cpp b/libcxx/test/benchmarks/containers/string.bench.cpp
index 776ee5f58b7e2..26e2f62ad57fe 100644
--- a/libcxx/test/benchmarks/containers/string.bench.cpp
+++ b/libcxx/test/benchmarks/containers/string.bench.cpp
@@ -36,10 +36,6 @@ void bench(std::string name, Func func, Mod modifier = {}) {
     func(std::type_identity<char>(), state);
   })->Apply(modifier);
 
-  benchmark::RegisterBenchmark(rename(name, "u8string"), [=](benchmark::State& state) {
-    func(std::type_identity<char8_t>(), state);
-  })->Apply(modifier);
-
 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
   benchmark::RegisterBenchmark(rename(name, "wstring"), [=](benchmark::State& state) {
     func(std::type_identity<wchar_t>(), state);


        


More information about the libcxx-commits mailing list