[llvm-branch-commits] [libcxx] [libc++][format][3/7] Improves std::format performance. (PR #101817)
Louis Dionne via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Aug 13 10:11:27 PDT 2024
================
@@ -58,23 +59,156 @@ namespace __format {
/// This helper is used together with the @ref back_insert_iterator to offer
/// type-erasure for the formatting functions. This reduces the number to
/// template instantiations.
+///
+/// The design of the class is being changed to improve performance and do some
+/// code cleanups.
+/// The original design (as shipped up to LLVM-19) uses the following design:
+/// - There is an external object that connects the buffer to the output.
+/// - The class constructor stores a function pointer to a grow function and a
+/// type-erased pointer to the object that does the grow.
----------------
ldionne wrote:
```suggestion
/// - The class constructor stores a function pointer to a "grow" function and a
/// type-erased pointer to the object that should be grown.
```
https://github.com/llvm/llvm-project/pull/101817
More information about the llvm-branch-commits
mailing list