[libcxx-commits] [PATCH] D110495: [libc++][format][2/6] Adds a __output_iterator.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 9 09:56:11 PST 2022


Mordante added a comment.

In D110495#3306205 <https://reviews.llvm.org/D110495#3306205>, @ldionne wrote:

> Sorry, I hadn't seen this was waiting for some sort of resolution.

No problem I was busy with other format parts which I wanted in LLVM 14. Otherwise I would have pinged you on Discord.

> @Mordante do you have an already planned way of addressing the inefficiencies raised by @vitaut? If not, I'd like to have a solution for those before shipping this. Otherwise, there's a risk that we'll forget about it and eventually ship the library without these optimizations (which IIUC are not merely nice-to-haves, but really important basic guarantees). I especially want to avoid us being painted into a corner where these optimizations are difficult to achieve in the current design.

I've ideas how I want to address these inefficiencies and added TODOs in the code. Before we mark format as complete I will review those TODOs and see whether they are blocking for marking the implementation complete. For example after moving the floating-point formatter to the dylib the proper `long double` implementation won't be an ABI break. (This requires `long double` support in `to_chars`. I want to tackle that, but it isn't trivial.)

The current changes in this series are an improvement. Especially for `formatted_size` and `format_to_n` that now use a `string` as temporary buffer.

I prefer to land the current improvement and look at further optimizations later.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110495



More information about the libcxx-commits mailing list