From: Stefan Kangas Date: Sat, 30 Oct 2021 18:11:16 +0000 (+0200) Subject: Use primes for hash table bucket sizes X-Git-Tag: emacs-29.0.90~3671^2~341 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=da67e888d5360297cdf20cd3d2a1148727d16e5a;p=emacs.git 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. --- diff --git a/src/dispextern.h b/src/dispextern.h index 08dac5d4557..e03e21fddcf 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -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 */ diff --git a/src/image.c b/src/image.c index 1c31bdd3d95..2ec44584b66 100644 --- a/src/image.c +++ b/src/image.c @@ -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. */