[libcxx-commits] [libcxx] [libc++] Optimize num_get integral functions (PR #121795)
Florian Hahn via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 10 08:23:27 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
----------------
fhahn wrote:
The last change to support `__builtin_assume_derefenceable` with pointer differences landed in `main` recently, so somehing like https://clang.godbolt.org/z/sEPbx3YaM now works.
Please let me know if anything else is missing
https://github.com/llvm/llvm-project/pull/121795
More information about the libcxx-commits
mailing list