[libcxx-commits] [PATCH] D125761: [libc++] Lets to_chars use header implementation.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 1 22:44:23 PDT 2022
Mordante marked 2 inline comments as done.
Mordante added inline comments.
================
Comment at: libcxx/src/ryu/d2s.cpp:529
- _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c0, 2);
- _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c1, 2);
- _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __d0, 2);
- _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __d1, 2);
+ _VSTD::memcpy(_Mid -= 2, __itoa::__digits_base_10 + __c0, 2);
+ _VSTD::memcpy(_Mid -= 2, __itoa::__digits_base_10 + __c1, 2);
----------------
ldionne wrote:
> To consider: If this increases our diff with "upstream" Ryu, it might be better to either `#define __DIGIT_TABLE __itoa::__digits_base_10`, or `static constexpr auto& __DIGIT_TABLE = __itoa::__digits_base_10;`.
As mentioned in the live review, since the code is in the dylib we can use `inline constexpr` instead of `static constexpr`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125761/new/
https://reviews.llvm.org/D125761
More information about the libcxx-commits
mailing list