[libcxx-commits] [PATCH] D101752: Speedup to_string for integers using zero-copy.

Roman Koshelev via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 6 22:01:25 PDT 2021


Roman-Koshelev added a comment.

As I said

  std::string buf;
  buf.resize(buf.capacity());

with C ++ 20 completely constexpr and equivalent

  char buf[bufsize];

It is also obvious that

  string(buf, res.ptr);

worse than

  buf.resize(res.ptr - buf.data());


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101752/new/

https://reviews.llvm.org/D101752



More information about the libcxx-commits mailing list