gecko/xpcom/string
Nathan Froyd 7e3aa317f4 Bug 1247359 - micro-optimize the common case of String{Begins,End}With; r=erahm
StringBeginsWith (resp. StringEndsWith) takes a defaulted
nsStringComparator object for doing comparisons.  The flexibility this
affords is great, but the cost is not: nsStringComparator has virtual
methods, so initializing that defaulted object (at every callsite)
requires a temporary object whose vtable must be initialized.

Since the overwhemingly common case is to use the default comparator
anyway, we should not use defaulted arguments and instead provide the
default comparator/user-provided comparator cases as separate overloads.
This change eliminates the virtual call for the majority of callsites
and reduces codesize as well.
2016-02-10 14:31:06 -05:00
..
crashtests
moz.build
nsAString.h
nsCharTraits.h
nsDependentString.cpp
nsDependentString.h
nsDependentSubstring.cpp
nsDependentSubstring.h
nsEmbedString.h
nsLiteralString.h
nsPrintfCString.h
nsPromiseFlatString.cpp
nsPromiseFlatString.h
nsReadableUtils.cpp Bug 1247359 - micro-optimize the common case of String{Begins,End}With; r=erahm 2016-02-10 14:31:06 -05:00
nsReadableUtils.h Bug 1247359 - micro-optimize the common case of String{Begins,End}With; r=erahm 2016-02-10 14:31:06 -05:00
nsString.cpp
nsString.h
nsStringBuffer.h
nsStringComparator.cpp
nsStringFwd.h
nsStringIterator.h
nsStringObsolete.cpp
nsSubstring.cpp
nsSubstring.h
nsSubstringTuple.cpp
nsSubstringTuple.h
nsTDependentString.cpp
nsTDependentString.h
nsTDependentSubstring.cpp
nsTDependentSubstring.h
nsTLiteralString.h
nsTPromiseFlatString.cpp
nsTPromiseFlatString.h
nsTString.cpp
nsTString.h
nsTStringComparator.cpp
nsTStringObsolete.cpp Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
nsTSubstring.cpp
nsTSubstring.h Bug 1239125. Add operator!=(char_type*) to nsTSubstring. r=froydnj 2016-01-13 15:59:09 -05:00
nsTSubstringTuple.cpp
nsTSubstringTuple.h
nsUTF8Utils.h
nsUTF8UtilsSSE2.cpp
nsXPCOMStrings.h
nsXPIDLString.h
README.html
string-template-def-char.h
string-template-def-unichar.h
string-template-undef.h

<html>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<body>
  <h1><span class="LXRSHORTDESC">managing sequences of characters</span></h1>
<p>
  <span class="LXRLONGDESC"></span>
</p>
</body>
</html>