Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 844 Bytes

README.md

File metadata and controls

32 lines (24 loc) · 844 Bytes

A minimal implementation of a B-tree

To run some examples: make run_test

Sample test output here and (with cache, 1M individual inserts in 1.5s) here

The interface for a B-tree looks like:

(** Result of invoking make functor: the B-tree interface *)
module type T = sig
  type k
  type v
  type t
  val create      : fn:string -> t
  val open_       : fn:string -> t
  val find        : t -> k -> v option
  val insert      : t -> k -> v -> unit
  val insert_many : t -> (k * v) list -> (k * v) list
  val delete      : t -> k -> unit
  val close       : t -> unit
end

(see src/make_intf.ml)

Docs may be found here