llvm-project/libcxx/test/std
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
..
algorithms [libc++][test][NFC] Remove libcpp-no-concepts. 2022-03-20 15:39:26 +01:00
atomics [libcxx][AIX] Remove `LIBCXX-AIX-FIXME` in isalwayslockfree check after 86478c7ad8 2022-03-08 01:23:33 +00:00
concepts [libc++] Define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER whenever we enable warnings in the test suite 2022-03-15 17:17:54 -04:00
containers [libc++] Re-enable workaround for pre-ranges CTAD in std::span 2022-03-21 21:56:42 -04:00
depr [libc++] Add warning pragma macros in the test suite 2022-03-17 00:11:20 +01:00
diagnostics [libc++][AIX] Add AIX error message as expected output 2022-02-22 14:34:36 -05:00
experimental [libc++] Rename *SAFE_STATIC to *CONSTINIT, and normalize its uses. 2022-02-15 10:39:41 -05:00
input.output [libc++][AIX] AIX allows for changing permissions of symlinks 2022-03-21 14:39:37 -04:00
iterators [libc++][test][NFC] Remove libcpp-no-concepts. 2022-03-20 15:39:26 +01:00
language.support [libc++] Add warning pragma macros in the test suite 2022-03-17 00:11:20 +01:00
library/description/conventions [libc++][ranges] Implement ranges::min 2022-03-18 12:52:21 +01:00
localization [libc++] Add warning pragma macros in the test suite 2022-03-17 00:11:20 +01:00
namespace [libc++] Add an option to disable wide character support in libc++ 2021-10-12 06:08:23 -04:00
numerics [libc++] Add warning pragma macros in the test suite 2022-03-17 00:11:20 +01:00
ranges [libc++] Add warning pragma macros in the test suite 2022-03-17 00:11:20 +01:00
re [libc++] Replace _LIBCPP_HAS_NO_CONCEPTS with _LIBCPP_STD_VER > 17. NFCI. 2022-03-13 12:32:06 -04:00
strings [libc++] Prepare string tests for constexpr 2022-03-19 18:48:14 +01:00
thread [libc++] Remove _LIBCPP_HAS_NO_STRONG_ENUMS. 2022-03-01 20:27:20 +01:00
utilities [libc++][format][2/6] Adds a __output_iterator. 2022-03-26 16:48:01 +01:00
pstl