mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2026-03-09 15:13:33 -04:00
Replace the pure-OCaml FNV-1 implementation in CCInt64 with C stubs that call the same cc_fnv_hash_int64 core as CCInt.hash: - hash: int64 -> int via caml_cc_hash_int64 ([@unboxed] + [@@noalloc]) - hash_to_int64: int64 -> int64 via new caml_cc_hash_int64_to_int64 entry points (masks result to non-negative, needs caml_copy_int64 for bytecode so cannot be [@@noalloc]) Add 18 tests in t_int64.ml covering: - Non-negativity of hash and hash_to_int64 - Consistency between hash and hash_to_int64 - Different inputs produce different hashes - Determinism - QuickCheck: hash is non-negative for random inputs |
||
|---|---|---|
| .. | ||
| cbor | ||
| core | ||
| data | ||
| leb128 | ||
| pvec | ||