Skip to content

Commit

Permalink
update saturn.mli
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrm committed Dec 5, 2024
1 parent d3282c4 commit 65022f1
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/saturn.mli
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,16 @@ Copyright (c) 2017, Nicolas ASSOUAD <[email protected]>

(** {2 Unsafe Data Structures}
Some data structures have both a normal and an {b unsafe} version. The
{b unsafe} version uses `Obj.magic`, which may be unsafe with flambda2
optimizations.
The unsafe version is provided because certain optimizations require features
not currently available in OCaml, such as arrays of atomics or atomic fields
in records. It is recommended to use the normal version unless performance
requirements necessitate the unsafe version. *)
Some data structures have both a normal and an {b unsafe} version. The
{b unsafe} version uses `Obj.magic`, which can be unsafe, especially with
flambda2 optimizations.
The unsafe version is provided to explore performance optimizations that
require features not currently available in OCaml, such as arrays of atomics
or atomic fields in records. These versions give an indication of the
potential performance improvements when such features become available.
It is recommended to use the normal version unless the performance
requirements justify the risks associated with the unsafe version. *)

(** {1 Data structures} *)

Expand Down

0 comments on commit 65022f1

Please sign in to comment.