mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2026-03-08 06:37:59 -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.
23 lines
366 B
Text
23 lines
366 B
Text
(executables
|
|
(names run_benchs run_bench_hash run_objsize)
|
|
(libraries
|
|
containers
|
|
containers_pvec
|
|
containers-data
|
|
benchmark
|
|
gen
|
|
iter
|
|
qcheck
|
|
oseq
|
|
batteries
|
|
sek)
|
|
(flags :standard -warn-error -3-5 -w -60 -safe-string -color always)
|
|
(optional)
|
|
(ocamlopt_flags
|
|
:standard
|
|
-O3
|
|
-color
|
|
always
|
|
-unbox-closures
|
|
-unbox-closures-factor
|
|
20))
|