diff options
| author | Rye <rye@alchemyviewer.org> | 2026-01-10 01:24:56 -0500 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-01-21 22:07:08 +0200 |
| commit | 0e687a83b5bd3fd0b33f7e9a5f5955391ec2d5e5 (patch) | |
| tree | 7d4846f8e201a8432fb6eb571c230bee58d39c22 /indra/llui/llcallbackmap.h | |
| parent | 76a80b6787290dc8a950b43b67e5b4cd6238014f (diff) | |
Optimize various usages of std::map with frequent find access with std::unordered_map
Introduce ll::string_hash heterogeneous string hasher
Diffstat (limited to 'indra/llui/llcallbackmap.h')
| -rw-r--r-- | indra/llui/llcallbackmap.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/llui/llcallbackmap.h b/indra/llui/llcallbackmap.h index 3115606d91..69b80db1e8 100644 --- a/indra/llui/llcallbackmap.h +++ b/indra/llui/llcallbackmap.h @@ -27,9 +27,11 @@ #ifndef LLCALLBACKMAP_H #define LLCALLBACKMAP_H -#include <map> +#include "llstl.h" + #include <string> #include <functional> +#include <unordered_map> class LLCallbackMap { @@ -37,7 +39,7 @@ public: // callback definition. typedef std::function<void* (void* data)> callback_t; - typedef std::map<std::string, LLCallbackMap> map_t; + typedef std::unordered_map<std::string, LLCallbackMap> map_t; typedef map_t::iterator map_iter_t; typedef map_t::const_iterator map_const_iter_t; |
