Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8877d7e6f89debabfe375cdfeeb9a44e8f0db9e6
      
https://github.com/WebKit/WebKit/commit/8877d7e6f89debabfe375cdfeeb9a44e8f0db9e6
  Author: Chris Dumez <[email protected]>
  Date:   2026-03-30 (Mon, 30 Mar 2026)

  Changed paths:
    M Source/WTF/wtf/text/StringConcatenate.h

  Log Message:
  -----------
  StringConcatenate: Reduce redundant StringTypeAdapter constructions in tuple 
adapter
https://bugs.webkit.org/show_bug.cgi?id=311051

Reviewed by Darin Adler.

Previously each element's `StringTypeAdapter` was constructed four times:
once in `computeLength`, once in `computeIs8Bit`, and twice in `writeTo`.
This is wasteful for adapters with expensive constructors (e.g.
`const char16_t*` doing a strlen-like scan, or `span<const char8_t>`
doing full UTF-8 validation).

Merge `computeLength` and `computeIs8Bit` into a single-pass helper
(`accumulateProperties`) and use a `writeOne` helper in `writeTo`,
reducing constructions to one per phase. Helper member function
templates are used instead of lambdas in fold expressions to avoid
incomplete-type errors on GCC.

* Source/WTF/wtf/text/StringConcatenate.h:

Canonical link: https://commits.webkit.org/310273@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to