mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 20:31:19 -03:00
Using XXHash64 for all wcstring unordered_map/set hashing
Since we are including XXHash32/64 anyway for the wchar_t* hashing, we might as well use it. Use arch-specific hash size and xxhash for all wcstring hashing Instead of using XXHash64 for all platforms, use the 32-bit version when running on 32-bit platforms where XXHash64 is significantly slower than XXHash32 (and the additional precision will not be used). Additionally, manually specify wcstring_hash as hashing method for non-const wcstring unordered_set/map instances (the const varieties don't have an in-library hash and so already use our xxhash-based specialization when calling std::hash<const wcstring>).
This commit is contained in:
@@ -66,7 +66,7 @@ class argparse_cmd_opts_t {
|
||||
wcstring_list_t raw_exclusive_flags;
|
||||
wcstring_list_t argv;
|
||||
std::unordered_map<wchar_t, option_spec_t *> options;
|
||||
std::unordered_map<wcstring, wchar_t> long_to_short_flag;
|
||||
std::unordered_map<wcstring, wchar_t, wcstring_hash> long_to_short_flag;
|
||||
std::vector<std::vector<wchar_t>> exclusive_flag_sets;
|
||||
|
||||
~argparse_cmd_opts_t() {
|
||||
|
||||
Reference in New Issue
Block a user