microsoft/STL

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

Open

#6 352 ouverte le 2 juil. 2026

Voir sur GitHub
 (1 commentaire) (0 réactions) (0 assignés)C++ (1 422 forks)batch import
enhancementhelp wantedperformance

Métriques du dépôt

Stars
 (9 475 stars)
Métriques de merge PR
 (Merge moyen 6j 13h) (6 PRs mergées en 30 j)

Description

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

Guide contributeur