[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
xan at webkit.org
xan at webkit.org
Sun Feb 20 22:47:45 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 602cf1bc9a771462e62e61114e2e323f515a06e6
Author: xan at webkit.org <xan at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jan 11 18:49:56 2011 +0000
2011-01-11 Xan Lopez <xlopez at igalia.com>
Reviewed by Darin Adler.
Microoptimization in ~JSString
https://bugs.webkit.org/show_bug.cgi?id=52222
The case where m_fibers is 0 seems to be the most common one
(almost 1/2 of the time, followed at some distance by m_fibers = 1
in 1/4 of the cases in a typical SunSpider execution). We can save
one comparison in this common case by doing a bit of refactoring
in the JSString destructor; overall a 0.3% progression, but only
the string tests show improvement.
* runtime/JSString.h:
(JSC::RopeBuilder::~JSString):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75517 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
index e00e45f..2fa5dfc 100644
--- a/Source/JavaScriptCore/ChangeLog
+++ b/Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,20 @@
+2011-01-11 Xan Lopez <xlopez at igalia.com>
+
+ Reviewed by Darin Adler.
+
+ Microoptimization in ~JSString
+ https://bugs.webkit.org/show_bug.cgi?id=52222
+
+ The case where m_fibers is 0 seems to be the most common one
+ (almost 1/2 of the time, followed at some distance by m_fibers = 1
+ in 1/4 of the cases in a typical SunSpider execution). We can save
+ one comparison in this common case by doing a bit of refactoring
+ in the JSString destructor; overall a 0.3% progression, but only
+ the string tests show improvement.
+
+ * runtime/JSString.h:
+ (JSC::RopeBuilder::~JSString):
+
2011-01-10 Michael Saboff <msaboff at apple.com>
Reviewed by Geoffrey Garen.
diff --git a/Source/JavaScriptCore/runtime/JSString.h b/Source/JavaScriptCore/runtime/JSString.h
index be9f882..6696404 100644
--- a/Source/JavaScriptCore/runtime/JSString.h
+++ b/Source/JavaScriptCore/runtime/JSString.h
@@ -314,11 +314,15 @@ namespace JSC {
~JSString()
{
ASSERT(vptr() == JSGlobalData::jsStringVPtr);
- for (unsigned i = 0; i < m_fiberCount; ++i)
- RopeImpl::deref(m_other.m_fibers[i]);
-
- if (!m_fiberCount && m_other.m_finalizerCallback)
- m_other.m_finalizerCallback(this, m_other.m_finalizerContext);
+ if (!m_fiberCount) {
+ if (m_other.m_finalizerCallback)
+ m_other.m_finalizerCallback(this, m_other.m_finalizerContext);
+ } else {
+ unsigned i = 0;
+ do
+ RopeImpl::deref(m_other.m_fibers[i]);
+ while (++i < m_fiberCount);
+ }
}
const UString& value(ExecState* exec) const
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list