raze/source/common/utility/superfasthash.h
Christoph Oelckers e24b1e8903 - replaced all uses of xxhash with SuperFastHash.
That's one more third party dependency down.
Not only are two hashing algorithms redundant, there was also a large size discrepancy: SuperFastHash is 3 kb of source code while xxhash is 120kb and generally extremely awful code.
It was easy to make a choice here. None of the use cases require this kind of performance tweaking, the longest hashed block of data is a 768 byte palette.
2019-11-02 22:52:13 +01:00

20 lines
358 B
C

#pragma once
#include <stdint.h>
uint32_t SuperFastHash (const char *data, size_t len);
uint32_t SuperFastHashI (const char *data, size_t len);
inline unsigned int MakeKey(const char* s)
{
if (s == NULL)
{
return 0;
}
return SuperFastHashI(s, strlen(s));
}
inline unsigned int MakeKey(const char* s, size_t len)
{
return SuperFastHashI(s, len);
}