Bug 252442 - Add String / StringView find() overloads that take in a LChar / char instead of a UChar
Summary: Add String / StringView find() overloads that take in a LChar / char instead ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-02-16 16:18 PST by Chris Dumez
Modified: 2023-02-16 19:03 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2023-02-16 16:18:21 PST
Add String / StringView find() overloads that take in a LChar / char instead of a UChar. It is pretty common to see code in WebKit doing `string.find(':')`. When the input string is 8-bit, converting ':' to a UChar can be inefficient as we have optimized versions of StringImpl::find() / WTF::find() that take in a LChar/char.
Comment 1 Chris Dumez 2023-02-16 16:21:18 PST
Pull request: https://github.com/WebKit/WebKit/pull/10239
Comment 2 EWS 2023-02-16 19:02:03 PST
Committed 260415@main (2984e2efc933): <https://commits.webkit.org/260415@main>

Reviewed commits have been landed. Closing PR #10239 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-02-16 19:03:20 PST
<rdar://problem/105576849>