Commit b833d193e65ffbf4ce67025450d36994268aaadf

Pierre Le Marre 2025-09-15T14:07:05

xkbcomp: Use keycode name LUT for xkb_keycodes Replace linear search of keycode names with O(1). Given that: - the number of atoms is usually < 1k; - the keycode section usually appears first; then the first atoms will be mostly the keycodes and their aliases, so we can achieve O(1) lookup of the key names by using a simple atom → keycode array. The LUT will be used also to process `xkb_symbols` for further speedup. On my setup I get a 1.039x speedup at the costs of less than 1% additional allocations.