Use primes for hash table bucket sizes

* src/dispextern.h (IMAGE_CACHE_BUCKETS_SIZE):
* src/image.c (XPM_COLOR_CACHE_BUCKETS): Use primes for hash table
bucket sizes.
This commit is contained in:
Stefan Kangas 2021-10-30 20:11:16 +02:00
parent ba9ae325e5
commit da67e888d5
2 changed files with 3 additions and 3 deletions

View file

@ -3162,7 +3162,7 @@ struct image_cache
/* Size of bucket vector of image caches. Should be prime. */
#define IMAGE_CACHE_BUCKETS_SIZE 1001
#define IMAGE_CACHE_BUCKETS_SIZE 1009
#endif /* HAVE_WINDOW_SYSTEM */

View file

@ -4116,9 +4116,9 @@ struct xpm_cached_color
};
/* The hash table used for the color cache, and its bucket vector
size. */
size (which should be prime). */
#define XPM_COLOR_CACHE_BUCKETS 1001
#define XPM_COLOR_CACHE_BUCKETS 1009
static struct xpm_cached_color **xpm_color_cache;
/* Initialize the color cache. */