Tommi Prami 125 Posted May 16 (edited) https://xxhash.com/doc/v0.8.2/index.html There are some Delphi implementations of some version of xxHash, bot not low level optimized version. -Tee- PS. posted this in wrong group ;( Edited May 16 by Tommi Prami Share this post Link to post
DelphiUdIT 145 Posted May 16 https://blogs.embarcadero.com/powerful-advanced-hashing-library-for-delphi-windows-development/ XXHash32 and XXHash64 are there (github link inside), but not optimizing I think. I looked around some DLL AVX2 optimized with Delphi wrapper, but I don't remember where. Share this post Link to post
Stefan Glienke 1974 Posted May 16 (edited) Spring4d has an optimized version for XXH32 that is being used for the hashtables (dictionary and co) - see https://bitbucket.org/sglienke/spring4d/src/2dbce92195d699d51fc99dd226c4698748ec8ef9/Source/Base/Spring.Hash.pas#lines-46 Since all other versions in that family have a larger width and the hashcode in hashtables is typically 32bit (larger would only be worth once you have more than 2^30 items in it) I did not bother to implement the others as well (also XXH3 is a bit more complicated, XXH32 is quite simple actually) Also since the architecture of Spring4d 2.0 is pluggable you can replace it with your own hash function if anyone wants to come up with a faster one (I tried for example one from mormot2) - see https://bitbucket.org/sglienke/spring4d/src/2dbce92195d699d51fc99dd226c4698748ec8ef9/Source/Base/Spring.Comparers.pas#lines-87 Keep in mind though that the usecase in Spring4d is for hashtables - which means these hash functions typically don't hash gigabytes of data as in other use cases. Nevertheless, the faster the better. As for a Delphi wrapper for the original C++ implementation -see https://github.com/YWtheGod/XXHASH4Delphi Edited May 16 by Stefan Glienke 1 Share this post Link to post