microsoft/STL

`<__msvc_int128.hpp>`, `<xcharconv_ryu.h>`: Consider unifying `_Base128::_UMul128()` and `__ryu_umul128()`

Open

#6.352 geöffnet am 2. Juli 2026

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)C++ (1.422 Forks)batch import
enhancementhelp wantedperformance

Repository-Metriken

Stars
 (9.475 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 6T 13h) (6 gemergte PRs in 30 T)

Beschreibung

After #6281, <__msvc_int128.hpp>'s _Base128::_UMul128() (always available) and <xcharconv_ryu.h>'s __ryu_umul128() (requires C++17) will share the same x64 and ARM64 intrinsic optimizations, but they have different fallback codepaths for x86 (and constant evaluation).

We should consider centralizing on _Base128::_UMul128() (which would be an enhancement, avoiding code duplication) but first I'd like to know whether one of the fallbacks is faster for x86 (which would be a performance improvement if we take the faster one). Not that I actually care about x86 perf these days, but we shouldn't regress it.

https://github.com/microsoft/STL/blob/c430582bc1147f4c01973f6a051415110c4eb286/stl/inc/__msvc_int128.hpp#L163-L177 https://github.com/microsoft/STL/blob/c430582bc1147f4c01973f6a051415110c4eb286/stl/inc/xcharconv_ryu.h#L158-L187

Contributor Guide