module Pooled_hashtbl: Pooled_hashtbl
include Core_hashtbl_intf.Hashtbl
val resize : ('a, 'b) t -> int -> unit
resize t size
ensures that t
can hold at least size
entries without resizing
(again), provided that t
has growth enabled. This is useful for sizing global
tables during application initialization, to avoid subsequent, expensive growth
online. See Zero.Immediate.String.resize
, for example.val on_grow : before:(unit -> 'a) ->
after:('a -> old_capacity:int -> new_capacity:int -> unit) -> unit
on_grow ~before ~after
allows you to connect higher level loggers to the point where
these hashtbls grow. before
is called before the table grows, and after
after it.
This permits you to e.g. measure the time elapsed between the two.
This is only meant for debugging and profiling, e.g. note that once a callback is
installed, there is no way to remove it.