Changeset 149013 in webkit
- Timestamp:
- Apr 23, 2013 6:10:51 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r149012 r149013 1 2013-04-23 Andreas Kling <akling@apple.com> 2 3 Micro-optimize Length::initFromLength(). 4 <http://webkit.org/b/115073> 5 6 From Blink r148621 by <timloh@chromium.org>: 7 8 This appears to improve html5-full-render by 1-2% on my system (gcc 4.6.3) by using memcpy 9 instead of copying members (and branching to copy the union). 10 11 * platform/Length.h: 12 (WebCore::Length::initFromLength): 13 1 14 2013-04-23 Kent Tamura <tkent@chromium.org> 2 15 -
trunk/Source/WebCore/platform/Length.h
r146272 r149013 25 25 26 26 #include "AnimationUtilities.h" 27 #include <string.h> 27 28 #include <wtf/Assertions.h> 28 29 #include <wtf/FastAllocBase.h> … … 280 281 return m_isFloat ? static_cast<int>(m_floatValue) : m_intValue; 281 282 } 282 void initFromLength(const Length &length) 283 { 284 m_quirk = length.m_quirk; 285 m_type = length.m_type; 286 m_isFloat = length.m_isFloat; 287 288 if (m_isFloat) 289 m_floatValue = length.m_floatValue; 290 else 291 m_intValue = length.m_intValue; 292 283 void initFromLength(const Length& length) 284 { 285 memcpy(this, &length, sizeof(Length)); 293 286 if (isCalculated()) 294 287 incrementCalculatedRef();
Note: See TracChangeset
for help on using the changeset viewer.