From bf1e5431f05532e457306c0944b3812ab6ea39f2 Mon Sep 17 00:00:00 2001 From: win7-7 Date: Sat, 25 May 2019 18:04:02 +0300 Subject: use memcmp for nsIAtom Equals to improve performance parser/html issue MoonchildProductions#1113 Use memcmp and not slower string Equals in nsHtml5Portability::localEqualsBuffer --- parser/html/nsHtml5Portability.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser/html/nsHtml5Portability.cpp b/parser/html/nsHtml5Portability.cpp index 36c7e758a..0a7c6f845 100644 --- a/parser/html/nsHtml5Portability.cpp +++ b/parser/html/nsHtml5Portability.cpp @@ -91,7 +91,7 @@ nsHtml5Portability::releaseString(nsString* str) bool nsHtml5Portability::localEqualsBuffer(nsIAtom* local, char16_t* buf, int32_t offset, int32_t length) { - return local->Equals(nsDependentSubstring(buf + offset, buf + offset + length)); + return local->Equals(buf + offset, length); } bool -- cgit v1.2.3