]> git.eshelyaron.com Git - emacs.git/commitdiff
Use primes for hash table bucket sizes
authorStefan Kangas <stefan@marxist.se>
Sat, 30 Oct 2021 18:11:16 +0000 (20:11 +0200)
committerStefan Kangas <stefan@marxist.se>
Sat, 30 Oct 2021 18:24:25 +0000 (20:24 +0200)
* src/dispextern.h (IMAGE_CACHE_BUCKETS_SIZE):
* src/image.c (XPM_COLOR_CACHE_BUCKETS): Use primes for hash table
bucket sizes.

src/dispextern.h
src/image.c

index 08dac5d4557533ba44012b6ab2a0637ccb613f89..e03e21fddcfa4a64ae44e57d700327d01fe5a135 100644 (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 */
 
index 1c31bdd3d95dca2ef95c2bae278911a79fe1aab3..2ec44584b6689466b1334a52462a34e61a78edc9 100644 (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.  */