-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://bugs.webkit.org/show_bug.cgi?id=271878 rdar://125595924 Reviewed by Mark Lam. This patch adds WTF::charactersContain SIMD function which scans entire string to check if one of character is included. This function is aligned to charactersAreAllASCII. The intention of this new function is assuming that the given characters rarely include specified characters. So this function super quickly scans entire string and returning the answer with SIMD. * Source/WTF/wtf/text/StringCommon.h: * Source/WebCore/html/TextFieldInputType.cpp: (WebCore::limitLength): (WebCore::TextFieldInputType::sanitizeValue const): * Source/WebCore/html/parser/HTMLParserIdioms.h: (WebCore::containsHTMLLineBreak): * Tools/TestWebKitAPI/Tests/WTF/StringCommon.cpp: (TestWebKitAPI::TEST(WTF_StringCommon, CharactersContain8)): (TestWebKitAPI::TEST(WTF_StringCommon, CharactersContain16)): Canonical link: https://commits.webkit.org/276842@main
- Loading branch information
1 parent
2349fc0
commit 4a75c60
Showing
4 changed files
with
213 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters