Use more efficient hash for hash tables

Bug #644160 reported by Stefan Götz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HIPL
Confirmed
Medium
Unassigned

Bug Description

All (or at least most) hash tables in the code (they can be found by looking for hip_ht_init()) use hash functions based on SHA1.

This is a performance issue because:
1) For hash table, a crytographically secure hash is by no means necessary and, e.g., simple XORing sufficient.
2) Only a relatively small amount (sizeof(long)) of the generated hash data is used by the hash function.
3) In some places, creating the hash involves copying several data elements into a common temporary buffer for hashing. This is in itself expensive and can in some instances be avoided because the data elements actually reside next to each other in memory in the first place.

I am tempted to claim that due to these factors, some of the hash tables could be replaced with linked lists and linear search would perform better :-) This code area is a worthwhile cleanup task.

Changed in hipl:
importance: Undecided → Medium
Changed in hipl:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.