llvm-project/libcxx/test/std/utilities
Mark de Wever 555214cbcc [libc++][format][2/6] Adds a __output_iterator.
Instead of using a temporary `string` in `__vformat_to_wrapped` use a new
generic iterator. This aids to reduce the number of template instantions
and avoids using a `string` to buffer the entire formatted output.

This changes the type of `format_context` and `wformat_context`, this can
still be done since the code isn't ABI stable yet.

Several approaches have been evaluated:
- Using a __output_buffer base class with:
  - a put function to store the buffer in its internal buffer
  - a virtual flush function to copy the internal buffer to the output
- Using a `function` to forward the output operation to the output buffer,
  much like the next method.
- Using a type erased function point to store the data in the buffer.
The last version resulted in the best performance. For some cases there's
still a loss of speed over the original method. This loss many becomes
apparent when large strings are copied to a pointer like iterator, before
the compiler optimized this using `memcpy`.

Reviewed By: ldionne, vitaut, #libc

Differential Revision: https://reviews.llvm.org/D110495
2022-03-26 16:48:01 +01:00
..
allocator.adaptor [libc++] P0433R2: add the remaining deduction guides. 2021-10-28 11:09:51 -07:00
any [libc++] [test] Remove `using std::any{,_cast}` from std/utilities/any/. NFCI. 2022-02-16 11:00:02 -05:00
charconv [libc++] Replace _LIBCPP_HAS_NO_CONCEPTS with _LIBCPP_STD_VER > 17. NFCI. 2022-03-13 12:32:06 -04:00
format [libc++][format][2/6] Adds a __output_iterator. 2022-03-26 16:48:01 +01:00
function.objects [libc++] Add warning pragma macros in the test suite 2022-03-17 00:11:20 +01:00
intseq [libc++] Clarify the name of Lit features related to standard library selection 2021-09-28 16:15:25 -04:00
memory [libc++] Make shared_ptr move unique_ptr's deleter 2022-03-18 11:50:31 -06:00
meta [libc++] Add warning pragma macros in the test suite 2022-03-17 00:11:20 +01:00
optional [libc++] Replace _LIBCPP_HAS_NO_CONCEPTS with _LIBCPP_STD_VER > 17. NFCI. 2022-03-13 12:32:06 -04:00
ratio [libc++] Remove workaround for .fail.cpp tests that don't have clang-verify markup 2020-04-15 10:53:37 -04:00
smartptr/unique.ptr [libc++] Better handling for zero-sized types. 2022-03-07 11:50:00 -05:00
template.bitset [libc++] Add warning pragma macros in the test suite 2022-03-17 00:11:20 +01:00
time [libc++] Fix chrono::duration constructor constraint 2022-02-03 18:07:12 -05:00
tuple [libc++] Add warning pragma macros in the test suite 2022-03-17 00:11:20 +01:00
type.index [libcxx][modularisation] splits `<utility>` into self-contained headers 2021-06-25 00:29:01 +00:00
utilities.general
utility [libc++] Replace _LIBCPP_HAS_NO_CONCEPTS with _LIBCPP_STD_VER > 17. NFCI. 2022-03-13 12:32:06 -04:00
utility.requirements
variant [libc++] Define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER whenever we enable warnings in the test suite 2022-03-15 17:17:54 -04:00