package incremental

  1. Overview
  2. Docs
Library for incremental computations

Install

Dune Dependency

Authors

Maintainers

Sources

v0.16.1.tar.gz
md5=c1c01831c72847296ce2569d2cc4372f
sha512=0116a82509c9037529092c5a31bdc8f0c64ed3d4c7a58a67f5250685196c9830e352100c83185bba8b2db949ffc9e3f39a0bbfe14c07e0da63e0302ca24aaa7a

doc/incremental.memoize/Incr_memoize/Store_params/index.html

Module Incr_memoize.Store_paramsSource

Represents parameters to initialize a store that will cache incremental computations.

Sourcetype 'key t
Sourceval map_based__store_forever : ('key, _) Core.Comparator.Module.t -> 'key t

Use a map as a backend, never remove from cache

Sourceval none : 'key t

Don't memoize. Behaves identically to Incr.bind

Sourceval hash_based__lru : max_size:int -> (module Core.Hashtbl.Key_plain with type t = 'key) -> 'key t

Use a hash table as a backend, evict the computation for the 'key that has been least recently accessed.

Sourceval alist_based__lru : equal:('key -> 'key -> bool) -> max_size:int -> 'key t

Use an alist as a backend, evict the computation for the 'key that has been least recently accessed. Operations to access the memoized computation are O(max_size) on each change in 'key.

Sourceval with_hooks : 'key t -> if_found:('key -> unit) -> if_added:('key -> unit) -> 'key t

Wraps another _ t, and calls the provided functions every time a value is found in or added to the cache. You can use this to log or record statistics about how much benefit you're getting from memoization.

OCaml

Innovation. Community. Security.