Skip to content

util/hash_table: add function for resizing a hash table

Mike Blumenkrantz requested to merge zmike/mesa:hash_table-resize into master

rehashing a populated hash table is very expensive, so for the case where the maximum/likely table size is already known, this function allows for pre-sizing the table to avoid ever needing a rehash

using this is a pretty big perf win in zink where a temporary (but sometimes large) hash table of a known size is used for managing/merging pre-draw barriers for descriptor resources as it avoids constant table rehashes when the table would otherwise need to grow incrementally

Merge request reports

Loading