Bug 1371097 - Change sRopeMatchThresholdRatioLog2 from 5 to 4 to flatten less eagerly. r=luke
authorJan de Mooij <jdemooij@mozilla.com>
Thu, 08 Jun 2017 20:19:37 +0200
changeset 411252 65c3ca9e63c0c85be91d5df2c06a806e1ad7436d
parent 411251 60b8fd06f8fb98d98f3aaa3e03b980291286842f
child 411253 d20646799abb8ab802873017464461bd1a526804
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs1371097
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1371097 - Change sRopeMatchThresholdRatioLog2 from 5 to 4 to flatten less eagerly. r=luke
js/src/jsstr.cpp
--- a/js/src/jsstr.cpp
+++ b/js/src/jsstr.cpp
@@ -1795,17 +1795,17 @@ StringMatch(JSLinearString* text, JSLine
             match = StringMatch(textChars, textLen, pat->latin1Chars(nogc), patLen);
         else
             match = StringMatch(textChars, textLen, pat->twoByteChars(nogc), patLen);
     }
 
     return (match == -1) ? -1 : start + match;
 }
 
-static const size_t sRopeMatchThresholdRatioLog2 = 5;
+static const size_t sRopeMatchThresholdRatioLog2 = 4;
 
 bool
 js::StringHasPattern(JSLinearString* text, const char16_t* pat, uint32_t patLen)
 {
     AutoCheckCannotGC nogc;
     return text->hasLatin1Chars()
            ? StringMatch(text->latin1Chars(nogc), text->length(), pat, patLen) != -1
            : StringMatch(text->twoByteChars(nogc), text->length(), pat, patLen) != -1;