diff --git a/nasmlib/hashtbl.c b/nasmlib/hashtbl.c index 95567eec..b53ed5b7 100644 --- a/nasmlib/hashtbl.c +++ b/nasmlib/hashtbl.c @@ -80,6 +80,8 @@ void **hash_findb(struct hash_table *head, const void *key, void **hash_find(struct hash_table *head, const char *key, struct hash_insert *insert) { + __builtin_prefetch(key); + return hash_findb(head, key, strlen(key)+1, insert); } @@ -124,6 +126,8 @@ void **hash_findib(struct hash_table *head, const void *key, size_t keylen, void **hash_findi(struct hash_table *head, const char *key, struct hash_insert *insert) { + __builtin_prefetch(key); + return hash_findib(head, key, strlen(key)+1, insert); } diff --git a/nasmlib/strlist.c b/nasmlib/strlist.c index 55cad656..ae6a3f2a 100644 --- a/nasmlib/strlist.c +++ b/nasmlib/strlist.c @@ -48,6 +48,8 @@ strlist_add(struct strlist *list, const char *str) struct hash_insert hi; size_t size; + __builtin_prefetch(str); + if (!list) return NULL;