[libcxx-commits] [PATCH] D70631: Microsoft's floating-point to_chars powered by Ryu and Ryu Printf
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Aug 31 12:26:00 PDT 2021
Mordante planned changes to this revision.
Mordante added a comment.
In D70631#2973662 <https://reviews.llvm.org/D70631#2973662>, @jorgbrown wrote:
> In D70631#2973239 <https://reviews.llvm.org/D70631#2973239>, @ldionne wrote:
>
>> In D70631#2577688 <https://reviews.llvm.org/D70631#2577688>, @Mordante wrote:
>>
>>> @ldionne should we enabling floating point support by a CMake configuration option which is ON by default. The tables aren't small and it could add bloat for embedded devices.
>>
>> Hmm, for now I'd make them available everywhere, and in the future, I'd add a knob if that is deemed useful. I believe that most embedded implementations will dead strip everything away if they don't use it anyways, so that might never be an issue.
I recently learned that while listening to ccpcast with Ben Craig ;-)
>> Once this is shipped, we'll only be missing `from_chars`, right?
In MSVC STL the `long double` implementation uses a `double`, which is valid for MSVC. But for Clang these have different sizes. So we probably need a special `long double` implementation. Ulf has implemented `long double` support in ryu.
>> We should be able to use https://github.com/fastfloat/fast_float to do that. We can ask if Daniel Lemire would relicense his code.
>
> I'm pretty sure I can get the Abseil team to license absl::from_chars (https://abseil.io/about/design/charconv), if desired.
Thanks for both suggestions. ATM the `from_chars` is a bit lower on my priority list, but I expect to pick it up at some point unless somebody beats me to it.
================
Comment at: libcxx/CREDITS.TXT:171
+
+N: Zhihao Yuan
+E: lichray at gmail.com
----------------
ldionne wrote:
> Let's not make these NFC changes in this patch.
This has recently be fixed already so a rebase solved this.
================
Comment at: libcxx/include/__charconv/ryu.h:63
+
+// https://github.com/ulfjack/ryu/tree/59661c3/ryu
+
----------------
ldionne wrote:
> If this code is taken from https://github.com/ulfjack/ryu/tree/59661c3/ryu, would it be possible/make sense to have a script that automatically re-derives it? I'm just asking because it would be awesome if we could slurp in any updates to that library automatically.
I would love to be able to automatically sync this code with upstream. I've no idea how much the uglification and libc++ specific attributes make this process feasible.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70631/new/
https://reviews.llvm.org/D70631
More information about the libcxx-commits
mailing list