From 9f548bb9ce8e238184d27965a560f1af882c0627 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kim=20Nguy=E1=BB=85n?= Date: Mon, 2 Apr 2012 14:37:21 +0200 Subject: [PATCH] Add efficient compare_int in INCLUDED .ml files. --- include/utils.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/utils.ml b/include/utils.ml index 7d3690a..fcb74c1 100644 --- a/include/utils.ml +++ b/include/utils.ml @@ -131,7 +131,8 @@ let next_power2 v = v+1 external vb : bool -> int = "%identity" - +let compare_int x y = vb (x > y) - vb (x < y) +let compare_int_unsafe x y = x - y END (* IFNDEF UTILS__ML__ *) -- 2.17.1