[webkit-changes] [WebKit/WebKit] 866cba: Do not use strlen unnecessarily for dtoa result
Yusuke Suzuki
noreply at github.com
Wed Aug 28 21:37:32 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 866cbaee79e9007c85214ddd28275d4f43f7cca5
https://github.com/WebKit/WebKit/commit/866cbaee79e9007c85214ddd28275d4f43f7cca5
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2024-08-28 (Wed, 28 Aug 2024)
Changed paths:
M Source/JavaScriptCore/runtime/PropertyName.h
M Source/WTF/wtf/dtoa.cpp
M Source/WTF/wtf/dtoa.h
M Source/WTF/wtf/text/AtomString.cpp
M Source/WTF/wtf/text/StringConcatenateNumbers.h
M Source/WTF/wtf/text/WTFString.cpp
M Source/WebCore/platform/Decimal.cpp
Log Message:
-----------
Do not use strlen unnecessarily for dtoa result
https://bugs.webkit.org/show_bug.cgi?id=278830
rdar://134898507
Reviewed by Keith Miller.
Add numberToStringAndSize to return the size of generated string so that we do not need to strlen repeatedly.
We change String::number / AtomString(double) etc. with this.
* Source/WTF/wtf/dtoa.cpp:
(WTF::numberToStringAndSize):
(WTF::numberToString):
* Source/WTF/wtf/dtoa.h:
* Source/WTF/wtf/text/AtomString.cpp:
(WTF::AtomString::number):
* Source/WTF/wtf/text/StringConcatenateNumbers.h:
* Source/WTF/wtf/text/WTFString.cpp:
(WTF::String::number):
Canonical link: https://commits.webkit.org/282883@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list