From 92be5631d8e319babf5cca49f53ea5e692c54793 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 15 Mar 2016 00:20:00 +0100 Subject: Optimisations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/zcmpmag.c | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 src/zcmpmag.c (limited to 'src/zcmpmag.c') diff --git a/src/zcmpmag.c b/src/zcmpmag.c deleted file mode 100644 index 5594502..0000000 --- a/src/zcmpmag.c +++ /dev/null @@ -1,29 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#include "internals.h" - - -int -zcmpmag(z_t a, z_t b) -{ - size_t i, j; - if (unlikely(zzero(a))) - return -!zzero(b); - if (unlikely(zzero(b))) - return 1; - i = a->used - 1; - j = b->used - 1; - for (; i > j; i--) { - if (a->chars[i]) - return +1; - a->used--; - } - for (; j > i; j--) { - if (b->chars[j]) - return -1; - b->used--; - } - for (; i; i--) - if (a->chars[i] != b->chars[i]) - return (a->chars[i] > b->chars[i]) * 2 - 1; - return a->chars[0] < b->chars[0] ? -1 : a->chars[0] > b->chars[0]; -} -- cgit v1.2.3-70-g09d2