summaryrefslogtreecommitdiff
path: root/drw.c%252525252525252525253fid%252525252525252525253d5a20b409c673a6736c3f9326...
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2023-07-07 17:00:42 +0600
committerHiltjo Posthuma <hiltjo@codemadness.org>2023-07-07 15:03:57 +0200
commit7ab0cb5ef0e19352fc5d64ae0d57a5cf4540acbf (patch)
tree9d68f06933733c75cceca65a19f1a16501946327 /drw.c%252525252525252525253fid%252525252525252525253d5a20b409c673a6736c3f9326cb54edc32908f717%2525252525252525253fid%2525252525252525253d164986763a29db97abb52b15cbd282b5636d83c0%25252525252525253fid%25252525252525253d164986763a29db97abb52b15cbd282b5636d83c0&id2%25252525252525253d09d0a36e0370f7ca9bdb171bf93c5ac3131c5a92%252525252525253fid%252525252525253d164986763a29db97abb52b15cbd282b5636d83c0%2525252525253fid%2525252525253d09d0a36e0370f7ca9bdb171bf93c5ac3131c5a92%25252525253fid%25252525253dacbf35a5e35b6f6a7dd3f8da49a6e5ec5ac075ce%252525253fid%252525253dacbf35a5e35b6f6a7dd3f8da49a6e5ec5ac075ce%2525253fid%2525253dacbf35a5e35b6f6a7dd3f8da49a6e5ec5ac075ce%3fid%3d8df553e0048733bab4bc85a6b76bcfd44c046e71?id=7ab0cb5ef0e19352fc5d64ae0d57a5cf4540acbf
parent0fe460dbd469a1d5b6a7140d0e1801935e4a923b (diff)
drw: minor improvement to the nomatches cache
1. use `unsigned int` to store the codepoints, this avoids waste on common case where `long` is 64bits. and POSIX guarantees `int` to be at least 32bits so there's no risk of truncation. 2. since switching to `unsigned int` cuts down the memory requirement by half, double the cache size from 64 to 128. 3. instead of a linear search, use a simple hash-table for O(1) lookups.
Diffstat (limited to 'drw.c%252525252525252525253fid%252525252525252525253d5a20b409c673a6736c3f9326cb54edc32908f717%2525252525252525253fid%2525252525252525253d164986763a29db97abb52b15cbd282b5636d83c0%25252525252525253fid%25252525252525253d164986763a29db97abb52b15cbd282b5636d83c0&id2%25252525252525253d09d0a36e0370f7ca9bdb171bf93c5ac3131c5a92%252525252525253fid%252525252525253d164986763a29db97abb52b15cbd282b5636d83c0%2525252525253fid%2525252525253d09d0a36e0370f7ca9bdb171bf93c5ac3131c5a92%25252525253fid%25252525253dacbf35a5e35b6f6a7dd3f8da49a6e5ec5ac075ce%252525253fid%252525253dacbf35a5e35b6f6a7dd3f8da49a6e5ec5ac075ce%2525253fid%2525253dacbf35a5e35b6f6a7dd3f8da49a6e5ec5ac075ce%3fid%3d8df553e0048733bab4bc85a6b76bcfd44c046e71?id=7ab0cb5ef0e19352fc5d64ae0d57a5cf4540acbf')
0 files changed, 0 insertions, 0 deletions