Up

Module Float_ref

Signature

type t

Allows mutable float record fields where setting the value is much faster because it avoids write barrier. Benchmarks show about eight times better performance for setting the value. Reading the value is the same speed as for mutable float.

val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val __bin_read_t__ : (int -> t) Core.Std.Bin_prot.Read.reader
val create : float -> t

Create a t with the given initial value.

val get : t -> float
val set : t -> float -> unit