summaryrefslogtreecommitdiff
path: root/docs/ReleaseNotes.rst
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2018-07-26 21:29:54 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2018-07-26 21:29:54 +0000
commit235b4df870a8aad9df76ca5f6abf890703d3c9cf (patch)
tree13f97a495d08e7c7245c8155ce442ac57bc6e57c /docs/ReleaseNotes.rst
parent8818f00dd61fc1ccda7daa9026737ec4617e4464 (diff)
ADT: Document advantages of SmallVector<T,0> over std::vector
In light of the recent changes to SmallVector in r335421, r337514, and r337820, document its advantages over std::vector (see r175906 and r266909). Also add a release note. https://reviews.llvm.org/D49748 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338071 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/ReleaseNotes.rst')
-rw-r--r--docs/ReleaseNotes.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst
index ad8b44783ed..a6942c01914 100644
--- a/docs/ReleaseNotes.rst
+++ b/docs/ReleaseNotes.rst
@@ -101,6 +101,14 @@ Non-comprehensive list of changes in this release
* Early support for UBsan, X-Ray instrumentation and libFuzzer (x86 and x86_64) for OpenBSD. Support for MSan
(x86_64), X-Ray instrumentation and libFuzzer (x86 and x86_64) for FreeBSD.
+* ``SmallVector<T, 0>`` shrank from ``sizeof(void*) * 4 + sizeof(T)`` to
+ ``sizeof(void*) + sizeof(unsigned) * 2``, smaller than ``std::vector<T>`` on
+ 64-bit platforms. The maximum capacity is now restricted to ``UINT32_MAX``.
+ Since SmallVector doesn't have the exception-safety pessimizations some
+ implementations saddle std::vector with and is better at using ``realloc``,
+ it's now a better choice even on the heap (although when TinyPtrVector works,
+ it's even smaller).
+
* Note..
.. NOTE