diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-06-23 09:54:21 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-06-23 09:54:21 +0100 |
| commit | 7ceb768a2e87781289a6f887da2f85de67530026 (patch) | |
| tree | 002b92947251e14b397531cdc3d927f90334e315 /src/string.hh | |
| parent | fb223492495fa00b3fd1da60f2877cdef66f4b51 (diff) | |
Use an HashMap to store options in option manager
Turns out looking for options can get pretty slow, so O(1) lookup
seems better.
This should improve the performance of the #1460 issue
Diffstat (limited to 'src/string.hh')
| -rw-r--r-- | src/string.hh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/string.hh b/src/string.hh index bfafa482..418ce298 100644 --- a/src/string.hh +++ b/src/string.hh @@ -257,6 +257,7 @@ private: static_assert(std::is_trivial<StringView>::value, ""); template<> struct HashCompatible<String, StringView> : std::true_type {}; +template<> struct HashCompatible<StringView, String> : std::true_type {}; inline String::String(StringView str) : String{str.begin(), str.length()} {} |
