[libcxx-commits] [libcxx] [libcxx] Configuration option to lower deque block size (PR #198348)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 3 01:27:23 PDT 2026


================
@@ -522,6 +522,15 @@ typedef __char32_t char32_t;
 
 #  define _PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED
 
+#  ifndef _LIBCPP_USE_LOWER_DEQUE_BLOCK_SIZE
+#    define _LIBCPP_USE_LOWER_DEQUE_BLOCK_SIZE 0
+#    define _LIBCPP_DEQUE_TARGET_BLOCK_SIZE 4096
+#    define _LIBCPP_DEQUE_MIN_ELEMENTS_PER_BLOCK 16
+#  else
+#    define _LIBCPP_DEQUE_TARGET_BLOCK_SIZE 512
+#    define _LIBCPP_DEQUE_MIN_ELEMENTS_PER_BLOCK 2
----------------
philnik777 wrote:

"this matches libstdc++" is _very_ weak IMO. We want a good reason, and "someone else did it" is never a good reason. I think the absolute minimum I'd accept is 4.

https://github.com/llvm/llvm-project/pull/198348


More information about the libcxx-commits mailing list