U++ framework
Do not panic. Ask here before giving up.

Home » Community » U++ community news and announcements » Changes in hashing
Changes in hashing [message #54110] Mon, 01 June 2020 15:43 Go to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Up until now, hash codes in U++ very strictly 32bit dword. It turns out that using 64bit hash codes on 64bit CPUs is actually faster (more bytes can be processed at once), so I have introduced new type, hash_t, which is 32 bit with 32 bit CPU and 64 bit otherwise and changed the code to compute/use 64 bit hashes instead. Results in about 5% improvement in idmap benchmark...

Practical consideration for user types: If type supports hashing by dword GetHashValue() method, it will continue to work just fine, but might be improved by converting that to hash_t. Template specialisation GetHashValue needs to change the return type hash_t (compiler issues error if it is not).

Mirek
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: 2020.1 rc
Next Topic: Global Value Cache
Goto Forum:
  


Current Time: Sat Jul 04 11:02:13 GMT+2 2026

Total time taken to generate the page: 0.00376 seconds