From d5a00cf634d083efb00cd8feeb6c3ea44b63c258 Mon Sep 17 00:00:00 2001 From: Rangi Date: Fri, 15 Jan 2021 21:12:45 -0500 Subject: [PATCH] Comment cites the string hash algorithm (djb2) "If you just want to have a good hash function, and cannot wait, djb2 is one of the best string hash functions I know." --- src/asm/util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/asm/util.c b/src/asm/util.c index d1f04806..816ce845 100644 --- a/src/asm/util.c +++ b/src/asm/util.c @@ -16,7 +16,9 @@ #include "extern/utf8decoder.h" /* - * Calculate the hash value for a string + * Calculate the hash value for a string. + * Uses the djb2 algorithm (xor version). + * http://www.cse.yorku.ca/~oz/hash.html */ uint32_t calchash(const char *s) {