Changeset 152438 in webkit
- Timestamp:
- Jul 6, 2013 11:46:39 PM (11 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r152429 r152438 1 2013-07-06 Benjamin Poulain <benjamin@webkit.org> 2 3 Fix the performance regressions introduced by r152418 4 https://bugs.webkit.org/show_bug.cgi?id=118438 5 6 Reviewed by Sam Weinig. 7 8 * wtf/text/StringImpl.h: 9 (WTF::equal): 10 Looping between two arbitrary pointers prevents important loop 11 optimizations. 12 1 13 2013-07-05 Brent Fulgham <bfulgham@apple.com> 2 14 -
trunk/Source/WTF/wtf/text/StringImpl.h
r152418 r152438 1078 1078 } 1079 1079 #else 1080 ALWAYS_INLINE bool equal(const LChar* a, const LChar* b, unsigned length) { return std::equal(a, a + length, b); } 1081 ALWAYS_INLINE bool equal(const UChar* a, const UChar* b, unsigned length) { return std::equal(a, a + length, b); } 1082 #endif 1083 1084 ALWAYS_INLINE bool equal(const LChar* a, const UChar* b, unsigned length) { return std::equal(a, a + length, b); } 1085 ALWAYS_INLINE bool equal(const UChar* a, const LChar* b, unsigned length) { return std::equal(a, a + length, b); } 1080 ALWAYS_INLINE bool equal(const LChar* a, const LChar* b, unsigned length) { return !memcmp(a, b, length); } 1081 ALWAYS_INLINE bool equal(const UChar* a, const UChar* b, unsigned length) { return !memcmp(a, b, length * sizeof(UChar)); } 1082 #endif 1083 1084 ALWAYS_INLINE bool equal(const LChar* a, const UChar* b, unsigned length) 1085 { 1086 for (unsigned i = 0; i < length; ++i) { 1087 if (a[i] != b[i]) 1088 return false; 1089 } 1090 return true; 1091 } 1092 1093 ALWAYS_INLINE bool equal(const UChar* a, const LChar* b, unsigned length) { return equal(b, a, length); } 1094 1086 1095 WTF_EXPORT_STRING_API bool equalIgnoringCase(const StringImpl*, const StringImpl*); 1087 1096 WTF_EXPORT_STRING_API bool equalIgnoringCase(const StringImpl*, const LChar*);
Note: See TracChangeset
for help on using the changeset viewer.