mesa: Import a copy of the open-addressing hash table code I wrote.
authorEric Anholt <eric@anholt.net>
Wed, 7 Nov 2012 07:18:41 +0000 (23:18 -0800)
committerChad Versace <chad.versace@linux.intel.com>
Mon, 12 Nov 2012 23:52:42 +0000 (15:52 -0800)
commit35fd61bd99c15c2e13d3945b41c4db7df6e64319
tree23771a21726cb11bd292ba51a5e95022032c7af6
parent1e8dd15311dab217d74c7c5d5a2dee6f6d7bf95e
mesa: Import a copy of the open-addressing hash table code I wrote.

Mesa's chaining hash table for object names is slow, and this should be much
faster.  I namespaced the functions under _mesa_*, to avoid visibility
troubles that we may have had before with hash_table_* functions.

v2: Move .c file to main/, const a few things, clean up loop conditions,
    add/extend some comments.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
18 files changed:
configure.ac
src/mesa/SConscript
src/mesa/main/hash_table.c [new file with mode: 0644]
src/mesa/main/hash_table.h [new file with mode: 0644]
src/mesa/main/tests/Makefile.am
src/mesa/main/tests/hash_table/.gitignore [new file with mode: 0644]
src/mesa/main/tests/hash_table/Makefile.am [new file with mode: 0644]
src/mesa/main/tests/hash_table/collision.c [new file with mode: 0644]
src/mesa/main/tests/hash_table/delete_and_lookup.c [new file with mode: 0644]
src/mesa/main/tests/hash_table/delete_management.c [new file with mode: 0644]
src/mesa/main/tests/hash_table/destroy_callback.c [new file with mode: 0644]
src/mesa/main/tests/hash_table/insert_and_lookup.c [new file with mode: 0644]
src/mesa/main/tests/hash_table/insert_many.c [new file with mode: 0644]
src/mesa/main/tests/hash_table/null_destroy.c [new file with mode: 0644]
src/mesa/main/tests/hash_table/random_entry.c [new file with mode: 0644]
src/mesa/main/tests/hash_table/remove_null.c [new file with mode: 0644]
src/mesa/main/tests/hash_table/replacement.c [new file with mode: 0644]
src/mesa/sources.mak