Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 65023eebf485cd6787614876915c0afa3da15430
https://github.com/WebKit/WebKit/commit/65023eebf485cd6787614876915c0afa3da15430
Author: Yusuke Suzuki <[email protected]>
Date: 2024-04-19 (Fri, 19 Apr 2024)
Changed paths:
M Source/JavaScriptCore/runtime/JSString.h
M Source/JavaScriptCore/runtime/JSStringInlines.h
Log Message:
-----------
[JSC] Clean up JSRopeString::createSubstringOfResolved
https://bugs.webkit.org/show_bug.cgi?id=273008
rdar://126770852
Reviewed by Alexey Shvayka.
We found that this function is **incredibly** hot, and we need to optimize this
very aggressively.
1. Use ASSERT. This length() access is recorded as super hot in the profile.
2. Use is8Bit from the base string directly instead of accessing JSString*
base. Overall, let's not
access to JSString* base after allocating a new rope string.
3. Pass length / is8Bit to JSRopeString constructors. Let's not compute this
after allocating JSString.
* Source/JavaScriptCore/runtime/JSString.h:
* Source/JavaScriptCore/runtime/JSStringInlines.h:
(JSC::jsSubstringOfResolved):
Canonical link: https://commits.webkit.org/277768@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes