Perfect spatial hashing

Perfect spatial hashing
Sylvain Lefebvre, Hugues Hoppe.
ACM Trans. Graphics (SIGGRAPH), 25(3), 2006.
Sparse spatial data packed into a dense table using a simple collision-free map.
Abstract: We explore using hashing to pack sparse data into a compact table while retaining efficient random access. Specifically, we design a perfect multidimensional hash function — one that is precomputed on static data to have no hash collisions. Because our hash function makes a single reference to a small offset table, queries always involve exactly two memory accesses and are thus ideally suited for parallel SIMD evaluation on graphics hardware. Whereas prior hashing work strives for pseudorandom mappings, we instead design the hash function to preserve spatial coherence and thereby improve runtime locality of reference. We demonstrate numerous graphics applications including vector images, texture sprites, alpha channel compression, 3D-parameterized textures, 3D painting, simulation, and collision detection.
Hindsights: The perfect hash data structure can be generalized to represent variable-sized data records as described in Texel programs for random-access antialiased vector graphics (MSR-TR-2007-95). Alcantara et al. [2009] explore parallel construction of perfect spatial hashes.