diff options
author | axel <axel@liljencrantz.se> | 2007-01-17 02:37:07 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2007-01-17 02:37:07 +1000 |
commit | 54e19b1efbc3a959f4d5207bc9faeab2f4b25aab (patch) | |
tree | e5d7e4bdb2dcfe9302855a691bb5ba037aa3ab2e /util.h | |
parent | f603b6ef68696be0f90a5fe6c834665d6e2670bb (diff) |
Add a one-item cache into the hash table. This reduces the number of hash computations by roughly 20%
darcs-hash:20070116163707-ac50b-214a16d4210d32fb50693e71a14b6b8f3fededfe.gz
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -73,6 +73,8 @@ typedef struct hash_table { /** The array containing the data */ hash_struct_t *arr; + /** A simple one item cache. This should always point to the index of the last item to be used */ + int cache; /** Number of elements */ int count; /** Length of array */ |