Bug 1371215 part 1 - Use the memchr optimization on OS X too, as it's fast now. r=luke
authorJan de Mooij <jdemooij@mozilla.com>
Fri, 09 Jun 2017 09:17:58 +0200
changeset 413642 f4048987a5e361345738dc2bf7ab6e44c9b78aac
parent 413641 587d7e9b6c7e5ae6697b8eeb1baf3d9e744c2199
child 413643 fce84022f5e3d9f600f2e56c5d4845423c558b8f
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs1371215
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 1371215 part 1 - Use the memchr optimization on OS X too, as it's fast now. r=luke
js/src/jsstr.cpp
--- a/js/src/jsstr.cpp
+++ b/js/src/jsstr.cpp
@@ -1625,21 +1625,17 @@ FirstCharMatcherUnrolled(const TextChar*
         t += 8;
     }
     return nullptr;
 }
 
 static const char*
 FirstCharMatcher8bit(const char* text, uint32_t n, const char pat)
 {
-#if  defined(__clang__)
-    return FirstCharMatcherUnrolled<char, char>(text, n, pat);
-#else
     return reinterpret_cast<const char*>(memchr(text, pat, n));
-#endif
 }
 
 static const char16_t*
 FirstCharMatcher16bit(const char16_t* text, uint32_t n, const char16_t pat)
 {
 #if defined(XP_DARWIN) || defined(XP_WIN)
     /*
      * Performance of memchr is horrible in OSX. Windows is better,