Pairing_heap.Unsafe
Unsafe
functions provide faster alternatives to regular functions with the same name. They don't allocate but the behavior is unspecified and could be memory unsafe in certain cases where regular functions would fail with informative exceptions.
module Elt : sig ... end
add_removable t v
returns a token that can be later used to remove v
. Unlike the regular function, this unsafe version doesn't allocate.
remove t elt
removes elt
from t
. Behavior is undefined and could lead to segfaults if t
and elt
don't match, if elt
was already removed, or if the underlying value has already been removed (e.g., via pop
).