SPIRV-Tools/test/util
pd-valve a123632ed9
Optimize Type::HashValue (#4707)
Incrementally compute the hash instead of collecting words

Avoids allocating temporary space in a std::vector and std::u32string, and making three passes over all the hashed data.
Switch to using std::vector to prevent processing duplicates instead of std::unordered_set: avoids an allocation/deletion every call to ComputeHashValue, and ends up faster due to much better cache behaviour and smaller constant-factor when searching the (generally very small) list.

In my test case, made Type::HashValue go from 7.5% of compilation time to .5%
2022-02-15 18:57:39 +00:00
..
bit_vector_test.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
bitutils_test.cpp Support constant-folding UConvert and SConvert (#2960) 2019-10-16 16:29:55 -04:00
CMakeLists.txt Optimize Type::HashValue (#4707) 2022-02-15 18:57:39 +00:00
hash_combine_test.cpp Optimize Type::HashValue (#4707) 2022-02-15 18:57:39 +00:00
ilist_test.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
small_vector_test.cpp Optimize Type::HashValue (#4707) 2022-02-15 18:57:39 +00:00