1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

hash: add wyhash + benchmark, add fnv1a, add u64.hex() (#3584)

This commit is contained in:
joe-conigliaro
2020-01-29 09:43:09 +11:00
committed by GitHub
parent 5a2534122e
commit 007baa2305
8 changed files with 374 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
import hash.fnv1a
fn test_fnv1a() {
a := 'apple'
b := fnv1a.sum64_string(a)
c := fnv1a.sum64(a.bytes())
assert b.hex() == '0xf74a62a458befdbf'
assert c.hex() == '0xf74a62a458befdbf'
}