sw/source/core/access/accmap.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit af8cb1039fd0cce86d771f4765c7d73c9f39b5a7
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Apr 26 15:19:01 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Apr 26 20:55:58 2023 +0200

    tdf#136749 std::map -> unordered_map
    
    considerably faster when looking up pointers, shaves 10% of time off
    here
    
    Change-Id: I521f8d557a30e4f430caab6b0701ad8da65f99f1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151063
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 46c0dbaf0714..fdee09f67722 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -89,10 +89,10 @@ public:
     typedef const SwFrame *                                               
key_type;
     typedef uno::WeakReference < XAccessible >                          
mapped_type;
     typedef std::pair<const key_type,mapped_type>                       
value_type;
-    typedef std::map<key_type, mapped_type>::iterator iterator;
-    typedef std::map<key_type, mapped_type>::const_iterator const_iterator;
+    typedef std::unordered_map<key_type, mapped_type>::iterator iterator;
+    typedef std::unordered_map<key_type, mapped_type>::const_iterator 
const_iterator;
 private:
-    std::map <key_type, mapped_type> maMap;
+    std::unordered_map <key_type, mapped_type> maMap;
 public:
 
 #if OSL_DEBUG_LEVEL > 0

Reply via email to