2020-05-28 18:15:41 +00:00
|
|
|
# ocaml-ppx-compare
|
|
|
|
|
2021-11-30 18:27:34 +00:00
|
|
|
[`Ppx_compare`](https://github.com/janestreet/ppx_compare) is a ppx rewriter
|
|
|
|
that derives comparison and equality functions from type representations. The
|
|
|
|
scaffolded functions are usually much faster than OCaml's `Pervasives.compare`
|
|
|
|
and `Pervasives.(=)`. Scaffolding functions also give more flexibility by
|
|
|
|
allowing them to be overridden for a specific type, and more safety by making
|
|
|
|
sure that only comparable values are compared.
|