Re: [Mesa-dev] [PATCH 18/18] mesa: overhaul debug namespace support

2014-04-25 Thread Chia-I Wu
On Fri, Apr 25, 2014 at 10:30 PM, Brian Paul wrote: > On 04/25/2014 04:42 AM, Chia-I Wu wrote: >> >> _mesa_HashTable is not well-suited for us: it locks a mutex unnecessarily >> and >> it does not accept 0 as the key (and have branches to handle 1 specially). >> What we really need is a sparse arr

Re: [Mesa-dev] [PATCH 18/18] mesa: overhaul debug namespace support

2014-04-25 Thread Brian Paul
On 04/25/2014 04:42 AM, Chia-I Wu wrote: _mesa_HashTable is not well-suited for us: it locks a mutex unnecessarily and it does not accept 0 as the key (and have branches to handle 1 specially). What we really need is a sparse array. Whether it should be implemented as a hash table, a list, or a

[Mesa-dev] [PATCH 18/18] mesa: overhaul debug namespace support

2014-04-25 Thread Chia-I Wu
_mesa_HashTable is not well-suited for us: it locks a mutex unnecessarily and it does not accept 0 as the key (and have branches to handle 1 specially). What we really need is a sparse array. Whether it should be implemented as a hash table, a list, or a bsearch()-able array requires investigation