gecko-dev/xpcom/ds
Markus Stange eb66969fc6 Bug 1839083 - Avoid out-of-line call to EnsureCapacity for the common case where the capacity is already sufficient. r=nika
In my local macOS arm64 `--enable-release` non-PGO builds, this fix
speeds AppendElement up by a small amount.

In official Nightlies, PGO appears to inline the full EnsureCapacity method,
so this fix may not make a difference in practice.

I noticed this out-of-line call in profiles of querySelectorAll,
in the append loop in Gecko_ContentList_AppendAll.

Before: https://share.firefox.dev/444f581
After: https://share.firefox.dev/3NAvuf9

Differential Revision: https://phabricator.services.mozilla.com/D181350
2023-06-19 15:58:48 +00:00
..
test Bug 1790816 - Reformat xpcom/ with isort. r=mccr8 DONTBUILD 2022-11-22 13:37:48 +00:00
tools Bug 1793463 - Part 3: Handle non-bytes keys more consistently in perfecthash, r=emilio 2022-12-01 15:43:18 +00:00
ArenaAllocator.h
ArenaAllocatorExtensions.h
ArrayAlgorithm.h
ArrayIterator.h
Atom.py
AtomArray.h
Dafsa.cpp
Dafsa.h
HTMLAtoms.py
IncrementalTokenizer.cpp
IncrementalTokenizer.h
Observer.h
PLDHashTable.cpp Bug 1733729: Fix non-unified build bustage in xpcom directory. r=mccr8 2021-10-05 00:29:56 +00:00
PLDHashTable.h Bug 1791961 - xpcom: Fix C++20 -Wambiguous-reversed-operator warnings. r=emilio 2023-05-26 04:51:44 +00:00
PerfectHash.h
SimpleEnumerator.h
StaticAtoms.py Bug 675943 - Part 1: Implement dirname attr for input elements within forms. r=edgar 2023-06-06 07:51:36 +00:00
StickyTimeDuration.h Bug 1660405 - Move away from mozilla::IsInfinite in favor of std::isinf. r=nbp,media-playback-reviewers,alwu 2023-03-22 11:35:34 +00:00
Tokenizer.cpp Bug 1741665 - Align nsCString's public size_type better with other C++ APIs, r=mccr8,geckoview-reviewers,agi 2021-12-13 21:47:56 +00:00
Tokenizer.h
components.conf Bug 1789902 - Part 2: Use XPCOM static components instead of Services in Rust, r=xpcom-reviewers,necko-reviewers,barret,valentin 2022-09-13 13:47:13 +00:00
moz.build Bug 1812753 - Move xpcom/ds/MruCache.h to mfbt/, r=glandium 2023-01-31 17:59:25 +00:00
nsArray.cpp Bug 1514936, part 2 - Drop the outer arguments from static components. r=xpcom-reviewers,nika 2022-05-17 20:24:19 +00:00
nsArray.h Bug 1514936, part 2 - Drop the outer arguments from static components. r=xpcom-reviewers,nika 2022-05-17 20:24:19 +00:00
nsArrayEnumerator.cpp
nsArrayEnumerator.h
nsArrayUtils.cpp
nsArrayUtils.h
nsAtom.h Bug 1823397, Add nsAutoAtom*String, r=emilio 2023-03-20 13:56:00 +00:00
nsAtomTable.cpp Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato 2022-08-03 16:39:41 +00:00
nsAtomTable.h Bug 1800582 - Don't count atoms in the a11y cache r=Jamie 2022-11-16 09:55:27 +00:00
nsBaseHashtable.h Bug 1184468 - Add To(T)Array functions that materialize a range into an array. r=xpcom-reviewers,nika 2021-03-24 17:51:11 +00:00
nsCOMArray.cpp
nsCOMArray.h
nsCRT.cpp
nsCRT.h Bug 1709559 - Avoid using PL_str implementations when fuzzing network. r=valentin,necko-reviewers,xpcom-reviewers,KrisWright 2021-05-05 18:09:28 +00:00
nsCharSeparatedTokenizer.cpp Bug 1772006 - Part 8: Allow building xpcom/string without unified builds, r=xpcom-reviewers,barret 2022-07-30 00:12:49 +00:00
nsCharSeparatedTokenizer.h
nsCheapSets.h
nsClassHashtable.h Bug 1634281 - Pull up GetOrInsertNew to nsBaseHashtable and support other smart pointer types. r=xpcom-reviewers,nika 2021-03-02 09:02:19 +00:00
nsDeque.cpp
nsDeque.h
nsEnumeratorUtils.cpp
nsEnumeratorUtils.h
nsExpirationTracker.h Bug 1697344 p1: Make GradientCache thread safe. r=jrmuizel 2021-03-29 12:12:20 +00:00
nsGkAtoms.cpp
nsGkAtoms.h Bug 1704658: Implement ParamTraits for RefPtr<nsAtom> r=nika 2021-04-27 08:20:18 +00:00
nsHashKeys.h Bug 1741665 - Align nsCString's public size_type better with other C++ APIs, r=mccr8,geckoview-reviewers,agi 2021-12-13 21:47:56 +00:00
nsHashPropertyBag.cpp Bug 1738927 - Create nsSimpleHashPropertyBag for non-main thread usage; r=xpcom-reviewers,janv,mccr8 2021-11-08 12:02:40 +00:00
nsHashPropertyBag.h Bug 1738927 - Create nsSimpleHashPropertyBag for non-main thread usage; r=xpcom-reviewers,janv,mccr8 2021-11-08 12:02:40 +00:00
nsHashtablesFwd.h Bug 1727422 - Support arbitrary integer keys in nsTHashMap, r=xpcom-reviewers,mccr8 2021-08-25 16:31:08 +00:00
nsIArray.idl
nsIArrayExtensions.idl
nsIINIParser.idl Bug 1787121: add support for formatting INI files to nsINIParser r=xpcom-reviewers,kmag 2022-09-28 13:17:41 +00:00
nsIMutableArray.idl
nsINIParserImpl.cpp Bug 1787121: add support for formatting INI files to nsINIParser r=xpcom-reviewers,kmag 2022-09-28 13:17:41 +00:00
nsINIParserImpl.h Bug 1773770: Part 4 - Migrate INI parser factory to static component registration. r=xpcom-reviewers,nika 2022-06-30 09:12:16 +00:00
nsIObserver.idl Bug 1802288 - remove trailing whitespaces in idl/webidl files r=credential-management-reviewers,webidl,smaug,sgalich 2022-12-28 09:52:44 +00:00
nsIObserverService.idl Bug 1802288 - remove trailing whitespaces in idl/webidl files r=credential-management-reviewers,webidl,smaug,sgalich 2022-12-28 09:52:44 +00:00
nsIPersistentProperties.h
nsIPersistentProperties2.idl Bug 1802288 - remove trailing whitespaces in idl/webidl files r=credential-management-reviewers,webidl,smaug,sgalich 2022-12-28 09:52:44 +00:00
nsIProperties.idl
nsIProperty.idl
nsIPropertyBag.idl Bug 1802288 - remove trailing whitespaces in idl/webidl files r=credential-management-reviewers,webidl,smaug,sgalich 2022-12-28 09:52:44 +00:00
nsIPropertyBag2.idl Bug 1581859: Part 3a - Add do_GetProperty helper for nsIPropertyBag2. r=mccr8 2021-03-25 19:47:01 +00:00
nsISerializable.idl
nsISimpleEnumerator.idl
nsIStringEnumerator.idl Bug 1802288 - remove trailing whitespaces in idl/webidl files r=credential-management-reviewers,webidl,smaug,sgalich 2022-12-28 09:52:44 +00:00
nsISupportsIterators.idl
nsISupportsPrimitives.idl
nsIVariant.idl
nsIWindowsRegKey.idl Bug 1679522 - Fix include directives and forward declarations. r=andi,necko-reviewers,jgilbert 2021-03-25 10:19:44 +00:00
nsIWritablePropertyBag.idl
nsIWritablePropertyBag2.idl
nsInterfaceHashtable.h Bug 1634281 - Merge nsRefPtrHashtable and nsInterfaceHashtable into nsRefCountedHashtable. r=xpcom-reviewers,necko-reviewers,nika 2021-03-04 18:52:19 +00:00
nsMathUtils.h
nsObserverList.cpp
nsObserverList.h
nsObserverService.cpp Bug 1780788 - Use abstract strings as in-arguments for ipdl. r=nika,necko-reviewers,media-playback-reviewers,alwu,dragana 2022-07-25 20:19:48 +00:00
nsObserverService.h Bug 1514936, part 2 - Drop the outer arguments from static components. r=xpcom-reviewers,nika 2022-05-17 20:24:19 +00:00
nsPersistentProperties.cpp Bug 1778211 - Reject xpidl CDATA containing 'virtual', r=xpcom-reviewers,necko-reviewers,mccr8,dragana 2022-07-06 14:53:06 +00:00
nsPersistentProperties.h Bug 1778211 - Reject xpidl CDATA containing 'virtual', r=xpcom-reviewers,necko-reviewers,mccr8,dragana 2022-07-06 14:53:06 +00:00
nsPointerHashKeys.h
nsProperties.cpp Bug 1733308 - Fix non-unified builds errors in xpcom/ds. r=xpcom-reviewers,mccr8 2021-10-01 01:49:17 +00:00
nsProperties.h
nsQuickSort.cpp
nsQuickSort.h
nsRefCountedHashtable.h Bug 1698098 - Add nsBaseHashtable::Clone methods. r=xpcom-reviewers,nika 2021-03-19 09:01:46 +00:00
nsRefPtrHashtable.h Bug 1634281 - Merge nsRefPtrHashtable and nsInterfaceHashtable into nsRefCountedHashtable. r=xpcom-reviewers,necko-reviewers,nika 2021-03-04 18:52:19 +00:00
nsSimpleEnumerator.cpp
nsSimpleEnumerator.h
nsStaticAtomUtils.h
nsStaticNameTable.cpp
nsStaticNameTable.h
nsStringEnumerator.cpp
nsStringEnumerator.h
nsSupportsPrimitives.cpp Bug 1792574, part 3 - Don't include nsMemory where it isn't needed. r=xpcom-reviewers,necko-reviewers,valentin,nika 2022-09-28 15:17:46 +00:00
nsSupportsPrimitives.h
nsTArray-inl.h Bug 1839083 - Avoid out-of-line call to EnsureCapacity for the common case where the capacity is already sufficient. r=nika 2023-06-19 15:58:48 +00:00
nsTArray.cpp Bug 1624717 - Copy release mode bounds checking from nsTArray to Array r=glandium 2021-09-09 13:29:18 +00:00
nsTArray.h Bug 1839083 - Avoid out-of-line call to EnsureCapacity for the common case where the capacity is already sufficient. r=nika 2023-06-19 15:58:48 +00:00
nsTArrayForwardDeclare.h
nsTHashMap.h Bug 1727422 - Support arbitrary integer keys in nsTHashMap, r=xpcom-reviewers,mccr8 2021-08-25 16:31:08 +00:00
nsTHashSet.h Bug 1184468 - Add To(T)Array functions that materialize a range into an array. r=xpcom-reviewers,nika 2021-03-24 17:51:11 +00:00
nsTHashtable.h Bug 1184468 - Add To(T)Array functions that materialize a range into an array. r=xpcom-reviewers,nika 2021-03-24 17:51:11 +00:00
nsTObserverArray.cpp
nsTObserverArray.h Bug 1761536 - Part 2: Replace nsTArray::elem_type with value_type, r=mccr8 2022-04-01 17:00:25 +00:00
nsTPriorityQueue.h
nsVariant.cpp Bug 1660405 - Move away from mozilla::IsNaN in favor of std::isnan. r=nbp,media-playback-reviewers,sergesanspaille,padenot 2023-03-22 11:35:33 +00:00
nsVariant.h
nsWhitespaceTokenizer.h
nsWindowsRegKey.cpp Bug 1514936, part 2 - Drop the outer arguments from static components. r=xpcom-reviewers,nika 2022-05-17 20:24:19 +00:00
nsWindowsRegKey.h Bug 1514936, part 2 - Drop the outer arguments from static components. r=xpcom-reviewers,nika 2022-05-17 20:24:19 +00:00