mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2026-03-08 22:58:08 -04:00
Implement FNV-1a hashing for CCInt.hash (and CCInt64.hash) as a C stub instead of a pure-OCaml Int64-based loop. The core hash operates on int64 values with separate entry points for int and int64. Includes a throughput benchmark in benchs/run_benchs.ml comparing the old pure-OCaml FNV hash vs the new C stub. The C stub is ~2x faster (~117k/s vs ~58k/s) with zero allocations. |
||
|---|---|---|
| .. | ||
| dune | ||
| objsize.ml | ||
| ref_impl.ml | ||
| run_bench_hash.ml | ||
| run_benchs.ml | ||
| run_benchs.sh | ||
| run_objsize.ml | ||