From cd0586f2d52699b1270e307c7cd76470ab40b7c3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 11 May 2022 11:02:34 +0200 Subject: reserve space for bulk operations in SequenceAsHashMap reduces the number of allocations we do Change-Id: If8e61c8b0dd1942278d7adc1fa87580734aeeb99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134157 Tested-by: Jenkins Reviewed-by: Noel Grandin --- comphelper/source/misc/sequenceashashmap.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'comphelper') diff --git a/comphelper/source/misc/sequenceashashmap.cxx b/comphelper/source/misc/sequenceashashmap.cxx index 0f15823651f9..b9662fbddbab 100644 --- a/comphelper/source/misc/sequenceashashmap.cxx +++ b/comphelper/source/misc/sequenceashashmap.cxx @@ -158,6 +158,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS sal_Int32 c = lSource.getLength(); sal_Int32 i = 0; + m_aMap.reserve(c); for (i=0; i