Re: [hackers] [dmenu][PATCH] minor improvement to the nomatches cache

2023-07-06 Thread Hiltjo Posthuma
On Thu, Jul 06, 2023 at 08:42:00PM +0600, NRK wrote: > 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

[hackers] [dmenu][PATCH] minor improvement to the nomatches cache

2023-07-06 Thread NRK
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