diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2018-07-26 21:29:54 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2018-07-26 21:29:54 +0000 |
| commit | 0f81faed05c3c7c1fbaf6af402411c99d715cf56 (patch) | |
| tree | 2d8a25006d66d29a8019ac80d986fb632d83608a /llvm/docs/ReleaseNotes.rst | |
| parent | c0a44791e750ed46d374f7acaeb0fad07122dff1 (diff) | |
| download | bcm5719-llvm-0f81faed05c3c7c1fbaf6af402411c99d715cf56.tar.gz bcm5719-llvm-0f81faed05c3c7c1fbaf6af402411c99d715cf56.zip | |
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
llvm-svn: 338071
Diffstat (limited to 'llvm/docs/ReleaseNotes.rst')
| -rw-r--r-- | llvm/docs/ReleaseNotes.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst index ad8b44783ed..a6942c01914 100644 --- a/llvm/docs/ReleaseNotes.rst +++ b/llvm/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 |

