-
Add a way of choosing a table's initial capacity and max occupancy rate, either by giving more parameters to the functor
Make_
, or by giving more parameters (with default values) to the functioncreate
. Check whether this degrades performance (with and without flambda). -
Add missing operations:
filter_map_inplace
,fold
,to_seq
,add_seq
,replace_seq
,of_seq
,to_seq_keys
,to_seq_values
. -
Check (improve) compatibility with
Stdlib.Hashtbl
, either by ensuring that our API matches theStdlib
API, or by providing a submodule that emulates theStdlib
API.create
: take capacity as an argumentadd
andreplace
: return nothing- need
find_opt
- need
length
as a synonym forcardinal
-
Develop a
Sentinel
module.Make
extends an existing type with one fresh sentinel.MakeMany
extends a type withn
fresh sentinels. -
Think about a concurrent variant of this data structure. Shrinking or growing the table requires blocking insertions and deletions (but not lookups). An insertion or deletion operation can be committed by a CAS on the
key
array. The table'spopulation
andoccupation
fields can be updated (via fetch-and-add) after the commit point, but this seems to imply that the current value of these fields can never be trusted unless the lock has been taken.