gecko-dev/xpcom/ds
Henri Sivonen 39dc649092 Bug 1488697 - Make StringBuilder::ToString avoid repeated capacity and aliasing checks as well as terminator writes. r=smaug
* Avoid the string implementation's capacity checks, since we know they
   succeed.
 * Avoid the string implementation's aliasing checks, since we know there's no
   aliasing.
 * Avoid writing the zero terminator more than once or out of sequence.
 * Use u"" literals when appending literals to a UTF-16 string.
 * Write runs of non-escaped code units instead of writing code unit by code
   unit in order to benefit from SIMD (either via memcpy or
   ConvertLatin1toUTF16).

This results in a 13% execution time reduction on desktop Haswell i7 when
getting the innerHTML of the body of the Selectors spec. (The WebKit
optimization target from https://bugs.webkit.org/show_bug.cgi?id=81214 .)

MozReview-Commit-ID: LAg3gkGJnpQ

Differential Revision: https://phabricator.services.mozilla.com/D5239

--HG--
extra : moz-landing-system : lando
2018-09-08 07:47:28 +00:00
..
tools Bug 1474739 - Part 3: Linting fixes on a CLOSED TREE, a=bustage 2018-08-01 18:23:21 -04:00
ArenaAllocator.h
ArenaAllocatorExtensions.h
ArrayIterator.h
Atom.py Bug 1483121 - Generate static atom hash in StaticAtoms.py. r=njn,emilio 2018-08-15 15:52:42 +10:00
AtomArray.h
Dafsa.cpp
Dafsa.h
HTMLAtoms.py Bug 1482782 - Part 1: Generate nsGkAtomList.h from a Python file. r=njn,hsivonen 2018-08-15 15:46:00 +10:00
IncrementalTokenizer.cpp
IncrementalTokenizer.h
moz.build Bug 1484496: Part 2 - Add common base class for all nsISimpleEnumerator implementations. r=froydnj 2018-08-18 14:22:47 -07:00
nsArray.cpp Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj 2018-08-18 21:06:32 -07:00
nsArray.h
nsArrayEnumerator.cpp Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj 2018-08-18 21:06:32 -07:00
nsArrayEnumerator.h Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj 2018-08-18 21:06:32 -07:00
nsArrayUtils.cpp
nsArrayUtils.h
nsAtom.h Bug 1488697 - Make StringBuilder::ToString avoid repeated capacity and aliasing checks as well as terminator writes. r=smaug 2018-09-08 07:47:28 +00:00
nsAtomTable.cpp Bug 1483121 - Generate static atom hash in StaticAtoms.py. r=njn,emilio 2018-08-15 15:52:42 +10:00
nsAtomTable.h
nsBaseHashtable.h
nsCharSeparatedTokenizer.h
nsCheapSets.h
nsClassHashtable.h
nsCOMArray.cpp
nsCOMArray.h
nsCRT.cpp
nsCRT.h
nsDataHashtable.h
nsDeque.cpp
nsDeque.h
nsEnumeratorUtils.cpp Bug 1484496: Part 3 - Fix nsISimpleEnumerator implementations with broken contracts. r=froydnj 2018-08-18 18:28:10 -07:00
nsEnumeratorUtils.h
nsExpirationTracker.h
nsGkAtoms.cpp Bug 1483121 - Generate static atom hash in StaticAtoms.py. r=njn,emilio 2018-08-15 15:52:42 +10:00
nsGkAtoms.h Bug 1483121 - Generate static atom hash in StaticAtoms.py. r=njn,emilio 2018-08-15 15:52:42 +10:00
nsHashKeys.h Bug 1486690 - Rename NS_str{,}dup and remove unnecessary checks after calls to them. r=glandium 2018-08-28 15:58:54 +10:00
nsHashPropertyBag.cpp Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj 2018-08-18 21:06:32 -07:00
nsHashPropertyBag.h
nsIArray.idl Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj 2018-08-18 21:06:32 -07:00
nsIArrayExtensions.idl Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj 2018-08-18 21:06:32 -07:00
nsIHashable.idl
nsIINIParser.idl
nsIMutableArray.idl Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj 2018-08-18 21:06:32 -07:00
nsINIParserImpl.cpp
nsINIParserImpl.h
nsInterfaceHashtable.h
nsIObserver.idl
nsIObserverService.idl
nsIPersistentProperties2.idl
nsIPersistentProperties.h
nsIProperties.idl
nsIProperty.idl
nsIPropertyBag2.idl
nsIPropertyBag.idl
nsISerializable.idl
nsISimpleEnumerator.idl Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj 2018-08-18 21:06:32 -07:00
nsIStringEnumerator.idl
nsISupportsIterators.idl
nsISupportsPrimitives.idl
nsIVariant.idl Bug 1474369 - Part 7: Rename [array] to LegacyArray within xpt and xpidl, r=mccr8 2018-07-31 17:53:03 -04:00
nsIWindowsRegKey.idl
nsIWritablePropertyBag2.idl
nsIWritablePropertyBag.idl
nsJSThingHashtable.h
nsMathUtils.h
nsObserverList.cpp Bug 1484496: Part 3 - Fix nsISimpleEnumerator implementations with broken contracts. r=froydnj 2018-08-18 18:28:10 -07:00
nsObserverList.h Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj 2018-08-18 21:06:32 -07:00
nsObserverService.cpp
nsObserverService.h
nsPersistentProperties.cpp Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj 2018-08-18 21:06:32 -07:00
nsPersistentProperties.h
nsPointerHashKeys.h Backed out changeset 9035ff3757ac (bug 1415980) at request from froydnj on the suspicion that it's going to break MSVC builds when it gets merged to central. 2018-07-31 01:19:49 +03:00
nsProperties.cpp
nsProperties.h
nsQuickSort.cpp
nsQuickSort.h
nsRefPtrHashtable.h
nsSimpleEnumerator.cpp Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj 2018-08-18 21:06:32 -07:00
nsSimpleEnumerator.h Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj 2018-08-18 21:06:32 -07:00
nsStaticAtomUtils.h Bug 1483449 - Simplify nsStaticAtomUtils::Lookup. r=njn 2018-08-16 11:40:02 +10:00
nsStaticNameTable.cpp Bug 1475461 - part 2: Make callers of PLDHashTable::Search() const methods if possible r=Ehsan 2018-07-13 19:01:53 +09:00
nsStaticNameTable.h Bug 1475461 - part 2: Make callers of PLDHashTable::Search() const methods if possible r=Ehsan 2018-07-13 19:01:53 +09:00
nsStringEnumerator.cpp Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj 2018-08-18 21:06:32 -07:00
nsStringEnumerator.h
nsSupportsPrimitives.cpp
nsSupportsPrimitives.h
nsTArray-inl.h Bug 1473804: Don't lie to AutoTArray::EnsureCapacity. r=erahm 2018-07-17 10:23:47 +02:00
nsTArray.cpp
nsTArray.h Bug 1479996 - Combine nsTArray::IndexOf and element access into lambda-friendly functions - r=froydnj 2018-08-28 22:04:09 +00:00
nsTArrayForwardDeclare.h
nsTHashtable.h Bug 1477626 - Document some differences between mozilla::HashTable and PLDHashTable. r=Waldo 2018-07-26 20:15:55 +10:00
nsTObserverArray.cpp
nsTObserverArray.h
nsTPriorityQueue.h
nsVariant.cpp Bug 1486690 - Rename nsMemory::Clone() and remove unnecessary checks after it. r=glandium 2018-08-28 15:59:19 +10:00
nsVariant.h
nsWhitespaceTokenizer.h
nsWindowsRegKey.cpp
nsWindowsRegKey.h
Observer.h Bug 1469914 - Prevent the HAL from registering duplicate observers; r=froydnj 2018-06-22 00:35:08 +02:00
PLDHashTable.cpp Bug 1477626 - Move ScrambleHashCode() from js/src/Utility.h to mfbt/HashFunctions.h. r=Waldo 2018-07-26 18:52:47 +10:00
PLDHashTable.h Bug 1477626 - Document some differences between mozilla::HashTable and PLDHashTable. r=Waldo 2018-07-26 20:15:55 +10:00
SimpleEnumerator.h Bug 1484373: Follow-up: Fix missed review comment. r=froydnj (implied) 2018-08-24 22:31:10 -07:00
StaticAtoms.py Bug 1455649 - DocumentL10n, part 3 - Plug DocumentL10n life cycle into DOM hooks. r=smaug 2018-09-06 18:28:40 -07:00
StickyTimeDuration.h
Tokenizer.cpp
Tokenizer.h