[libcxx-commits] [PATCH] D70631: Microsoft's floating-point to_chars powered by Ryu and Ryu Printf

Stephan T. Lavavej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 2 13:44:38 PDT 2021


STL_MSFT added inline comments.


================
Comment at: libcxx/include/__charconv/ryu.h:63
+
+// https://github.com/ulfjack/ryu/tree/59661c3/ryu
+
----------------
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.


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