diff options
author | David Howells <dhowells@redhat.com> | 2019-06-26 21:02:32 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2019-06-26 21:02:32 +0100 |
commit | 355ef8e15885020da88f5ba2d85ce42b1d01f537 (patch) | |
tree | 7c3f7c5b8b599fc487b3f822cf2ab402a9c791f5 /certs | |
parent | f771fde82051976a6fc0fd570f8b86de4a92124b (diff) | |
download | linux-stable-355ef8e15885020da88f5ba2d85ce42b1d01f537.tar.gz linux-stable-355ef8e15885020da88f5ba2d85ce42b1d01f537.tar.bz2 linux-stable-355ef8e15885020da88f5ba2d85ce42b1d01f537.zip |
keys: Cache the hash value to avoid lots of recalculation
Cache the hash of the key's type and description in the index key so that
we're not recalculating it every time we look at a key during a search.
The hash function does a bunch of multiplications, so evading those is
probably worthwhile - especially as this is done for every key examined
during a search.
This also allows the methods used by assoc_array to get chunks of index-key
to be simplified.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'certs')
0 files changed, 0 insertions, 0 deletions