more progress on grime for code2

This commit is contained in:
2025-10-12 01:52:08 -04:00
parent 983cac0660
commit 54ff97b6c1
14 changed files with 1225 additions and 297 deletions

9
code2/grime/hashing.odin Normal file
View File

@@ -0,0 +1,9 @@
package grime
hash32_djb8 :: #force_inline proc "contextless" ( hash : ^u32, bytes : []byte ) {
for value in bytes do (hash^) = (( (hash^) << 8) + (hash^) ) + u32(value)
}
hash64_djb8 :: #force_inline proc "contextless" ( hash : ^u64, bytes : []byte ) {
for value in bytes do (hash^) = (( (hash^) << 8) + (hash^) ) + u64(value)
}