mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2026-03-09 07:03:35 -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 |
||
|---|---|---|
| .. | ||
| compat | ||
| reg | ||
| dune | ||
| t.ml | ||
| t_array.ml | ||
| t_bencode.ml | ||
| t_bool.ml | ||
| t_byte_buffer.ml | ||
| t_canonical_sexp.ml | ||
| t_cbor.ml | ||
| t_char.ml | ||
| t_either.ml | ||
| t_eq.ml | ||
| t_float.ml | ||
| t_format.ml | ||
| t_fun.ml | ||
| t_hash.ml | ||
| t_hashtbl.ml | ||
| t_heap.ml | ||
| t_int.ml | ||
| t_int32.ml | ||
| t_int64.ml | ||
| t_IO.ml | ||
| t_list.ml | ||
| t_map.ml | ||
| t_nativeint.ml | ||
| t_option.ml | ||
| t_ord.ml | ||
| t_parse.ml | ||
| t_pp.ml | ||
| t_random.ml | ||
| t_result.ml | ||
| t_seq.ml | ||
| t_set.ml | ||
| t_sexp.ml | ||
| t_string.ml | ||
| t_unix.ml | ||
| t_utf8string.ml | ||
| t_vector.ml | ||