On Tue Feb 7 11:01:28 2023 +0000, Jinoh Kang wrote:
I have another idea: we can transpose the affinity group pointer array. The array will be taken out of `struct bin`, and its new type will be `struct group *affinity_group[32][BLOCK_SIZE_BIN_COUNT];`. This takes advantage of the fact that the number of bins is constant, or at least bounded. For example:
```c /* LFH group cache. Holds at most 1 group per bin. */ struct group_cache { struct group *bin_groups[BLOCK_SIZE_BIN_COUNT]; }; /* LFH state. Only allocated for growable heaps. */ struct lfh_state { struct bin bins[BLOCK_SIZE_BIN_COUNT]; /* each group_cache should reside in a different cache line if possible. */ struct group_cache *parallel_cache[ARRAY_SIZE(affinity_mapping)]; }; -- https://gitlab.winehq.org/wine/wine/-/merge_requests/1628#note_23245