[libcxx-commits] [libcxx] [libc++] Optimize num_get integral functions (PR #121795)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 10 07:33:16 PST 2025


================
@@ -83,11 +85,22 @@ struct __num_get : protected __num_get_base {
       unsigned*& __g_end,
       _CharT* __atoms);
 
-  _LIBCPP_HIDE_FROM_ABI static string __stage2_int_prep(ios_base& __iob, _CharT& __thousands_sep) {
-    locale __loc                 = __iob.getloc();
-    const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc);
-    __thousands_sep              = __np.thousands_sep();
-    return __np.grouping();
+  _LIBCPP_HIDE_FROM_ABI static ptrdiff_t __atoms_offset(const _CharT* __atoms, _CharT __val) {
+#  if _LIBCPP_HAS_ALGORITHM_VECTOR_UTILS
----------------
ldionne wrote:

Let's add a comment pointing to one of the bug reports we have on `std::find` not vectorizing properly. That way we can come back and simplify this code once Clang does the right thing.

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


More information about the libcxx-commits mailing list