No subject
Mon Jan 28 08:41:14 PST 2013
8621">r148621</a> by <timloh at chromium.org>:
This appears to improve html5-full-render by 1-2% on my system (gcc 4.6.3=
) by using memcpy
instead of copying members (and branching to copy the union).
* platform/Length.h:
(WebCore::Length::initFromLength):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href=3D"#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeL=
og</a></li>
<li><a href=3D"#trunkSourceWebCoreplatformLengthh">trunk/Source/WebCore/p=
latform/Length.h</a></li>
</ul>
</div>
<div id=3D"patch">
<h3>Diff</h3>
<a id=3D"trunkSourceWebCoreChangeLog"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (1490=
12 =3D> 149013)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/ChangeLog 2013-04-24 01:06:=
01 UTC (rev 149012)
+++ trunk/Source/WebCore/ChangeLog 2013-04-24 01:10:51 UTC (rev 149013)
</span><span class=3D"lines">@@ -1,3 +1,16 @@
</span><ins>+2013-04-23 Andreas Kling <akling at apple.com>
+
+ Micro-optimize Length::initFromLength().
+ <http://webkit.org/b/115073>
+
+ From Blink r148621 by <timloh at chromium.org>:
+
+ This appears to improve html5-full-render by 1-2% on my system (=
gcc 4.6.3) by using memcpy
+ instead of copying members (and branching to copy the union).
+
+ * platform/Length.h:
+ (WebCore::Length::initFromLength):
+
</ins><span class=3D"cx"> 2013-04-23 Kent Tamura <tkent at chromium.org=
>
</span><span class=3D"cx">=20
</span><span class=3D"cx"> Add missing copyright header to ColorC=
hooserClient.h
</span></span></pre></div>
<a id=3D"trunkSourceWebCoreplatformLengthh"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/platform/Length=
.h (149012 =3D> 149013)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/platform/Length.h 2013-04-2=
4 01:06:01 UTC (rev 149012)
+++ trunk/Source/WebCore/platform/Length.h 2013-04-24 01:10:51 UTC (rev 1=
49013)
</span><span class=3D"lines">@@ -24,6 +24,7 @@
</span><span class=3D"cx"> #define Length_h
</span><span class=3D"cx">=20
</span><span class=3D"cx"> #include "AnimationUtilities.h"
</span><ins>+#include <string.h>
</ins><span class=3D"cx"> #include <wtf/Assertions.h>
</span><span class=3D"cx"> #include <wtf/FastAllocBase.h>
</span><span class=3D"cx"> #include <wtf/Forward.h>
</span><span class=3D"lines">@@ -279,17 +280,9 @@
</span><span class=3D"cx"> ASSERT(!isUndefined());
</span><span class=3D"cx"> return m_isFloat ? static_cast<int&=
gt;(m_floatValue) : m_intValue;
</span><span class=3D"cx"> }
</span><del>- void initFromLength(const Length &length)=20
</del><ins>+ void initFromLength(const Length& length)
</ins><span class=3D"cx"> {
</span><del>- m_quirk =3D length.m_quirk;
- m_type =3D length.m_type;
- m_isFloat =3D length.m_isFloat;
- =20
- if (m_isFloat)
- m_floatValue =3D length.m_floatValue;
- else
- m_intValue =3D length.m_intValue;
- =20
</del><ins>+ memcpy(this, &length, sizeof(Length));
</ins><span class=3D"cx"> if (isCalculated())
</span><span class=3D"cx"> incrementCalculatedRef();
</span><span class=3D"cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>
More information about the webkit-changes
mailing list