Changeset 130456 in webkit
- Timestamp:
- Oct 4, 2012, 9:22:31 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r130454 r130456 1 2012-10-04 Eric Seidel <eric@webkit.org> 2 3 SVGAttributeHashTranslator does not need to copy QualifiedName in the common case 4 https://bugs.webkit.org/show_bug.cgi?id=98473 5 6 Reviewed by Adam Barth. 7 8 I tested this using instruments on a test case which modified SVG attributes in a loop. 9 I believe pdr has some perf-tests in this area, but they weren't needed here. A simple sample showed this as a huge win, 10 since we're no longer creating a QualifiedName (and thus adding it to the hash) on each QualifiedName-based lookup in SVG. 11 12 * svg/SVGElement.h: 13 (WebCore::SVGAttributeHashTranslator::hash): 14 (WebCore::SVGAttributeHashTranslator::equal): 15 1 16 2012-10-04 Julien Chaffraix <jchaffraix@webkit.org> 2 17 -
trunk/Source/WebCore/svg/SVGElement.h
r128009 r130456 158 158 159 159 struct SVGAttributeHashTranslator { 160 static unsigned hash( QualifiedNamekey)160 static unsigned hash(const QualifiedName& key) 161 161 { 162 key.setPrefix(nullAtom); 162 if (key.hasPrefix()) 163 return DefaultHash<QualifiedName>::Hash::hash(QualifiedName(nullAtom, key.localName(), key.namespaceURI())); 163 164 return DefaultHash<QualifiedName>::Hash::hash(key); 164 165 } 165 static bool equal( QualifiedName a, QualifiedNameb) { return a.matches(b); }166 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a.matches(b); } 166 167 }; 167 168
Note:
See TracChangeset
for help on using the changeset viewer.