atom: rewrite as a hash table
authorRan Benita <ran@unusedvar.com>
Sat, 2 Nov 2019 14:19:32 +0000 (16:19 +0200)
committerRan Benita <ran@unusedvar.com>
Tue, 27 Apr 2021 13:41:32 +0000 (16:41 +0300)
commit16fe837d8dfb325f1f8d8da17bf1f8709e0df9b2
tree27dd1b3c37aee99bb075662a3ac8747d1bae8afc
parentbaf5522649954d54ebb0227d42ceb71c7c6ea32c
atom: rewrite as a hash table

While the previous 1987-style[0] scheme was fun (and I reasonably
optimized it for a fair comparison), this task is more suited to a hash
table. Even a simple implementation beats the old one.

[0] Seems to have first appeared in X11R1, released September 1987.
    See server/dix/atom.c here: https://www.x.org/releases/X11R1/X.V11R1.tar.gz

Signed-off-by: Ran Benita <ran@unusedvar.com>
src/atom.c