[Mesa-dev] [PATCH 0/6] Prehash all the things
Thomas Helland
thomashelland90 at gmail.com
Mon May 22 18:55:39 UTC 2017
While this doesn't prehash all the things, it does switch quite a lot
of places from doing a search and then a subsequent insert to first
hash the key, and then use this hash when searching / inserting.
While our new pointer hashing function remedied much of our overhead
hashing pointers, there is still more to gain here. This cuts executed
instructions / task-clock by about 0.5% on a shader-db run on my i965
running machine. While that's not a lot, it is still a nice little
improvement on the way to less overhead. The changes should also be
fairly trivial, so it's not much of a burden.
Thomas Helland (6):
glsl: Prehash in refcount hash table to reduce hashing
nir: Prehash in instr_set to avoid hashing twice
glsl: Prehash in constant propagation
glsl: Prehash in constant variable pass to avoid hashing twice
glsl: Prehash to avoid computing the hash twice
util: Avoid computing hash twice in string_to_uint_map
src/compiler/glsl/ir_variable_refcount.cpp | 7 +++++--
src/compiler/glsl/opt_constant_propagation.cpp | 8 +++++---
src/compiler/glsl/opt_constant_variable.cpp | 6 ++++--
src/compiler/glsl/opt_copy_propagation_elements.cpp | 7 +++++--
src/compiler/nir/nir_instr_set.c | 7 +++++--
src/util/string_to_uint_map.h | 9 ++++++---
6 files changed, 30 insertions(+), 14 deletions(-)
--
2.13.0
More information about the mesa-dev
mailing list