summaryrefslogtreecommitdiffstats
path: root/llvm/docs/ProgrammersManual.rst
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-07-15 20:24:56 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-07-15 20:24:56 +0000
commitf51601c856d38b5654f933e30b887282f7676399 (patch)
treea25d8458078def575156e718d748161fd3554009 /llvm/docs/ProgrammersManual.rst
parente9fa3b8e6bb9a8d6d6674058c18b264cce83b026 (diff)
downloadbcm5719-llvm-f51601c856d38b5654f933e30b887282f7676399.tar.gz
bcm5719-llvm-f51601c856d38b5654f933e30b887282f7676399.zip
ADT: Add MapVector::remove_if
Add a `MapVector::remove_if()` that erases items in bulk in linear time, as opposed to quadratic time for repeated calls to `MapVector::erase()`. llvm-svn: 213090
Diffstat (limited to 'llvm/docs/ProgrammersManual.rst')
-rw-r--r--llvm/docs/ProgrammersManual.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/docs/ProgrammersManual.rst b/llvm/docs/ProgrammersManual.rst
index e828e6bf501..40eabbe442d 100644
--- a/llvm/docs/ProgrammersManual.rst
+++ b/llvm/docs/ProgrammersManual.rst
@@ -1441,8 +1441,10 @@ order, making it an easy (but somewhat expensive) solution for non-deterministic
iteration over maps of pointers.
It is implemented by mapping from key to an index in a vector of key,value
-pairs. This provides fast lookup and iteration, but has two main drawbacks: The
-key is stored twice and removing elements takes linear time.
+pairs. This provides fast lookup and iteration, but has two main drawbacks:
+the key is stored twice and removing elements takes linear time. If it is
+necessary to remove elements, it's best to remove them in bulk using
+``remove_if()``.
.. _dss_inteqclasses:
OpenPOWER on IntegriCloud