my pure pascal port of xxHash (32bit and 64bit).

my pure pascal port of xxHash (32bit and 64bit).
https://github.com/Xor-el/xxHashPascal

Comments

  1. Ugochukwu Mmaduekwe
    2. You pass a string (or TBytes) like so:

    Str:= 'Hallo';
    Hash:= FastxxHash32Calc(Str[low(Str)],Length(Str)*SizeOf(Char), seed);

    The use of low(Str) is for mobile where strings can be zero-based.

    1. Wait for the push to my git, it has the sanity checks from the original xxHash in it.

    ReplyDelete
  2. thanks a lot.
    am almost through incorporating your suggestions and corrections so as to match the result from the original xxHash.
    I also figured out that pointer(str)^ works.

    ReplyDelete
  3. added update

    Both xxHash (32 and 64 bit) now produces same results as the original C version.

    Special thanks to Johan Bontes for helping me out with benchmarking,
    various optimizations and corrections.

    ReplyDelete

Post a Comment