Commit d416bfa8 authored by Petteri Mäki's avatar Petteri Mäki
Browse files

optimizing speed of shuffle-ld

parent e44066b3
......@@ -423,15 +423,15 @@ static struct md5_memory_entry
md5_digest digest;
char * str; // owned
struct md5_memory_entry * next;
} * md5_memory = NULL;
} * md5_memory[1 << 12] = { };
static bfd_boolean md5_collisions = FALSE;
static void
check_md5_memory (const char * str, const md5_digest * digest)
{
struct md5_memory_entry ** next_ptr = &md5_memory;
for (struct md5_memory_entry * entry = md5_memory; entry != NULL; entry = entry->next)
struct md5_memory_entry ** next_ptr = &md5_memory[digest->data[0] % (sizeof(md5_memory)/sizeof(*md5_memory))];
for (struct md5_memory_entry * entry = *next_ptr; entry != NULL; entry = entry->next)
{
next_ptr = &entry->next;
if (memcmp ((const void *) digest, (const void *) &entry->digest, 128/8) == 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment