[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
Thu Sep 2 23:06:52 PDT 2021


Mordante planned changes to this revision.
Mordante marked 2 inline comments as done.
Mordante added inline comments.


================
Comment at: libcxx/include/__charconv/ryu.h:63
+
+// https://github.com/ulfjack/ryu/tree/59661c3/ryu
+
----------------
STL_MSFT wrote:
> ldionne wrote:
> > Mordante wrote:
> > > 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.
> > Well, actually, if we embed this implementation in the dylib exclusively, these headers could all move to `src/` and we would not even need to uglify them.
> Note that I extensively modified the upstream sources, not just for uglification and headerization but also to add bounds checking to every attempted buffer write. I kept a record of the changes I made (there's a git repo), but they aren't automatically applicable (rebasing to keep up with upstream commits was an entirely manual process, and I haven't performed such an update in a while; we've instead been modifying microsoft/STL directly). I was able to contribute much of my work upstream (in particular the performance tuning and some testing), but ran out of time for upstreaming the bounds checking in a form that would make sense in Ulf's C implementation.
Good point about moving the implementation to `src/`, that's already on my todo list for this patch. I prefer to look at syncing with Ulf's and MSVC STL's upstream after this patch has landed. When most of the implementation details are in the dylib there will be less ABI concerns.

@STL_MSFT The git repo you mentioned is that the public MSVC STL repo at GitHub?


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