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=255106 Reviewed by Geoffrey Garen. Micro-optimize jsStringWithCache(): - Call JSString::getValueImpl() instead of tryGetValueImpl() on the cached JSString. We know we never cache JSRopeStrings. - Call JSString::create() directly in the slow path instead of jsString() to avoid special handling of strings with length 0 and 1. It is unecessary since the fast path in jsStringWithCache() already did this special handling. * Source/JavaScriptCore/runtime/JSString.cpp: (JSC::jsStringWithCacheSlowCase): * Source/JavaScriptCore/runtime/JSString.h: (JSC::jsStringWithCache): Canonical link: https://commits.webkit.org/262712@main
- Loading branch information
Showing
2 changed files
with
13 additions
and
10 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