summaryrefslogtreecommitdiff
path: root/debian/patches/0008-libihash-use-linear-probing-and-fast-modulo-operatio.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/0008-libihash-use-linear-probing-and-fast-modulo-operatio.patch')
-rw-r--r--debian/patches/0008-libihash-use-linear-probing-and-fast-modulo-operatio.patch15
1 files changed, 8 insertions, 7 deletions
diff --git a/debian/patches/0008-libihash-use-linear-probing-and-fast-modulo-operatio.patch b/debian/patches/0008-libihash-use-linear-probing-and-fast-modulo-operatio.patch
index 84c09fc3..1c4a394c 100644
--- a/debian/patches/0008-libihash-use-linear-probing-and-fast-modulo-operatio.patch
+++ b/debian/patches/0008-libihash-use-linear-probing-and-fast-modulo-operatio.patch
@@ -1,7 +1,7 @@
-From 6ad3d3f3558391f02468dbac2d1d73daa8e2f7e1 Mon Sep 17 00:00:00 2001
+From b18240df917ef17a7877164e098092728c139bb6 Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Thu, 8 May 2014 18:33:57 +0200
-Subject: [PATCH 8/8] libihash: use linear probing and fast modulo operation
+Subject: [PATCH 08/11] libihash: use linear probing and fast modulo operation
libihash uses open addressing. Previously, quadratic probing in both
directions was used to resolve collisions. Quadratic probing might
@@ -22,8 +22,8 @@ sizes, so a bit mask can be used for the modulo operation.
* libihash/ihash.h (HURD_IHASH_MIN_SIZE): New macro.
---
libihash/ihash.c | 121 ++++++-------------------------------------------------
- libihash/ihash.h | 3 ++
- 2 files changed, 16 insertions(+), 108 deletions(-)
+ libihash/ihash.h | 4 ++
+ 2 files changed, 17 insertions(+), 108 deletions(-)
diff --git a/libihash/ihash.c b/libihash/ihash.c
index 1de4c35..e74a2c5 100644
@@ -210,14 +210,15 @@ index 1de4c35..e74a2c5 100644
ht->items = calloc (ht->size, sizeof (struct _hurd_ihash_item));
diff --git a/libihash/ihash.h b/libihash/ihash.h
-index 6bdc925..04c957f 100644
+index 6bdc925..057babc 100644
--- a/libihash/ihash.h
+++ b/libihash/ihash.h
-@@ -93,6 +93,9 @@ typedef struct hurd_ihash *hurd_ihash_t;
+@@ -93,6 +93,10 @@ typedef struct hurd_ihash *hurd_ihash_t;
/* Construction and destruction of hash tables. */
-+/* The size of the initial allocation in number of items. */
++/* The size of the initial allocation in number of items. This must
++ be a power of two. */
+#define HURD_IHASH_MIN_SIZE 32
+
/* The default value for the maximum load factor in percent. */