Title: [115656] trunk/Source/_javascript_Core
- Revision
- 115656
- Author
- [email protected]
- Date
- 2012-04-30 12:12:12 -0700 (Mon, 30 Apr 2012)
Log Message
jsSingleCharacterString and jsSingleCharacterSubstring are not inlined
https://bugs.webkit.org/show_bug.cgi?id=85147
Reviewed by Darin Adler.
The functions jsSingleCharacterString() and jsSingleCharacterSubstring() were not inlined
by the compiler. This annihilate the gains of using SmallStrings.
On stringProtoFuncCharAt(), this patch improves the performance by 11%.
* runtime/JSString.h:
(JSC::jsSingleCharacterString):
(JSC::jsSingleCharacterSubstring):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (115655 => 115656)
--- trunk/Source/_javascript_Core/ChangeLog 2012-04-30 19:02:25 UTC (rev 115655)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-04-30 19:12:12 UTC (rev 115656)
@@ -1,3 +1,19 @@
+2012-04-30 Benjamin Poulain <[email protected]>
+
+ jsSingleCharacterString and jsSingleCharacterSubstring are not inlined
+ https://bugs.webkit.org/show_bug.cgi?id=85147
+
+ Reviewed by Darin Adler.
+
+ The functions jsSingleCharacterString() and jsSingleCharacterSubstring() were not inlined
+ by the compiler. This annihilate the gains of using SmallStrings.
+
+ On stringProtoFuncCharAt(), this patch improves the performance by 11%.
+
+ * runtime/JSString.h:
+ (JSC::jsSingleCharacterString):
+ (JSC::jsSingleCharacterSubstring):
+
2012-04-30 Benjamin Poulain <[email protected]>
Add fast patch for radix == 10 on numberProtoFuncToString
Modified: trunk/Source/_javascript_Core/runtime/JSString.h (115655 => 115656)
--- trunk/Source/_javascript_Core/runtime/JSString.h 2012-04-30 19:02:25 UTC (rev 115655)
+++ trunk/Source/_javascript_Core/runtime/JSString.h 2012-04-30 19:12:12 UTC (rev 115656)
@@ -304,14 +304,14 @@
return globalData->smallStrings.emptyString(globalData);
}
- inline JSString* jsSingleCharacterString(JSGlobalData* globalData, UChar c)
+ ALWAYS_INLINE JSString* jsSingleCharacterString(JSGlobalData* globalData, UChar c)
{
if (c <= maxSingleCharacterString)
return globalData->smallStrings.singleCharacterString(globalData, c);
return JSString::create(*globalData, UString(&c, 1).impl());
}
- inline JSString* jsSingleCharacterSubstring(ExecState* exec, const UString& s, unsigned offset)
+ ALWAYS_INLINE JSString* jsSingleCharacterSubstring(ExecState* exec, const UString& s, unsigned offset)
{
JSGlobalData* globalData = &exec->globalData();
ASSERT(offset < static_cast<unsigned>(s.length()));
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes