[Mesa-dev] [PATCH 0/6] Prehash all the things
Thomas Helland
thomashelland90 at gmail.com
Tue Oct 10 13:22:19 UTC 2017
Hi!
Thanks for keeping up with the long wait =)
I revisited this not too long ago, and found that with the new
pointer hashing function the benefits are zero to negative
from this series. I've reduced it to only the instruction set and
the string_to_uint_map patch but it's not convincing.
I suspect we are seeing cache miss vs hashing tradeoffs.
So I've basically put it to rest for now. Might give it another
go sometime, but I think right now the effort is better spent
elsewhere in the codebase.
Greetings,
Thomas
2017-10-09 14:02 GMT+02:00 Dieter Nützel <Dieter at nuetzel-hh.de>:
> Hello Thomas,
>
> now, that you have write commit 'only' this one is missing.
> Maybe you have time for this.
>
> Latest version do not apply any longer.
>
> Wende an: util: Avoid computing hash twice in string_to_uint_map
> error: src/util/string_to_uint_map.h ist nicht im Index
> Anwendung des Patches fehlgeschlagen bei 0006 util: Avoid computing hash
> twice in string_to_uint_map
>
> Greetings,
> Dieter
>
>
> Am 19.06.2017 18:09, schrieb Dieter Nützel:
>>
>> Ping!
>>
>> Any news, reviews --- anyone?
>>
>> I'm running this all day without a hitch.
>>
>> Cheers,
>> Dieter
>>
>> Am 23.05.2017 05:40, schrieb Dieter Nützel:
>>>
>>> For the series:
>>>
>>> Tested-by: Dieter Nützel <Dieter at nuetzel-hh.de>
>>>
>>> on radeonsi/RX580
>>>
>>> Unigine_Heaven-4.0, Unigine_Valley-1.0, Unigine_Superposition-1.0,
>>> LS2015 (Wine-staging), Mesa-demos (objviewer)
>>>
>>> Dieter
>>>
>>> Am 22.05.2017 20:55, schrieb Thomas Helland:
>>>>
>>>> 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(-)
>>>
>>> _______________________________________________
>>> mesa-dev mailing list
>>> mesa-dev at lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list