For your purposes, stealing hex digits from and MD5 hash would be just as good. All you need are results which are well distributed among all possible outputs, to avoid having too many birthday collisions. It doesn't matter what day your hash is born on, as long as it's a low chance to match another hash's birthday.
If you're using 8 hex digits to hash a text string, for your purposes you'll probably have no difference from using $crc(string,0). If FNV-1a were made as an identifier, it would work too. For obtaining a hash digest from a text string, you'll probably not be seeing a speed difference between your choices of $md5 or one of the SHA hashes. SHA384 is the same hash as SHA512 except it begins with a different 512-bit magic constant, and it hides 128 bits of the output.
https://forums.mirc.com/ubbthreads....arger-disk-buffer-speed-boost#Post265792If you need to have the hash length be 8, you can squeeze 40 bits into an 8-character base 36 string:
//var %a samplestring7 | echo -a $base($left($sha512(%a),10),16,36,8)
Note the 8 is needed so it zero-pads shorter strings. With 40 bits in the base36 value, the birthday paradox reaches 50% around 2^20 instead of the 2^16 for 8 hex digits. If you don't want to zero-pad the string, your match-text needs to begin+end with the delimiter, and your list-of-hashes also needs to begin and end with the delimiter. But even then, you can't take advantage of the shorter string, because you can't count on any hashes being shorter 100% of the time.
//var %i 1 | while (%i isnum 1-13) { echo -a $base($str(F,%I),16,36) %i | inc %i }
As I mentioned earlier, lack of big integer support limits the hex string fetched from SHA at 13 hex digits, but once you encode 9 hex digits as 7 base36 digits, the range of 10-13 only give an extra 4 bits per base36 digit. But, if room in your string-to-be-searched is important, you can fit 14% more 7-digit base36 strings than 8-digit hex. If you need more than 9 hex digits as 7 base36 digits, your most efficient base36 hashes would do something like combining 9-to7 with 5-to-4, or 2 pairs of 9-to-7:
//var %a samplestring | echo -a $base($left($sha512(%a),9),16,36,7) $+ $base($right($sha512(%a),9),16,36,7)
//var %a samplestring | echo -a $base($left($sha512(%a),9),16,36,7) $+ $base($right($sha512(%a),5),16,36,4)