aboutsummaryrefslogtreecommitdiffstats
path: root/src/zlsb.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-03-13 05:30:01 +0100
committerMattias Andrée <maandree@kth.se>2016-03-13 05:30:01 +0100
commitf6cb7f3e7382a19a6d6d9990c243ffb8a666182d (patch)
treedbf43f976f66a39fd87ffa38d59194b425efaa68 /src/zlsb.c
parentMake zabs, zneg and zswap inline (diff)
downloadlibzahl-f6cb7f3e7382a19a6d6d9990c243ffb8a666182d.tar.gz
libzahl-f6cb7f3e7382a19a6d6d9990c243ffb8a666182d.tar.bz2
libzahl-f6cb7f3e7382a19a6d6d9990c243ffb8a666182d.tar.xz
Optimisations
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/zlsb.c')
-rw-r--r--src/zlsb.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/zlsb.c b/src/zlsb.c
deleted file mode 100644
index 17012f8..0000000
--- a/src/zlsb.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-#include "internals.h"
-
-
-size_t
-zlsb(z_t a)
-{
- size_t i = 0;
- zahl_char_t x;
- if (zzero(a))
- return SIZE_MAX;
- for (;; i++) {
- x = a->chars[i];
- if (x) {
- x = ~x;
- for (i *= BITS_PER_CHAR; x & 1; x >>= 1, i++);
- return i;
- }
- }
-}