commit d2998cadfbdf13a427966a44a17767c316d6d410
Author: Mattias Andrée <maandree_AT_kth.se>
AuthorDate: Thu Mar 3 21:17:20 2016 +0100
Commit: Mattias Andrée <maandree_AT_kth.se>
CommitDate: Thu Mar 3 21:17:20 2016 +0100
zsets: minor optimisation
Signed-off-by: Mattias Andrée <maandree_AT_kth.se>
diff --git a/src/zsets.c b/src/zsets.c
index 12669b9..4c97dcb 100644
--- a/src/zsets.c
+++ b/src/zsets.c
_AT_@ -27,13 +27,16 @@ zsets(z_t a, const char *str)
SET_SIGNUM(a, 0);
switch ((str_end - str) % 19) {
+ case 0:
while (*str) {
#define X(n)\
temp *= 10, temp += *str++ & 15;\
case n:
X(18) X(17) X(16) X(15) X(14) X(13) X(12) X(11) X(10)
- X(9) X(8) X(7) X(6) X(5) X(4) X(3) X(2) X(1) X(0)
+ X(9) X(8) X(7) X(6) X(5) X(4) X(3) X(2) X(1)
#undef X
+ temp *= 10, temp += *str++ & 15;
+
zmul(a, a, libzahl_const_1e19);
zsetu(libzahl_tmp_str_num, temp);
zadd(a, a, libzahl_tmp_str_num);
Received on Thu Mar 03 2016 - 21:17:52 CET
This archive was generated by hypermail 2.3.0
: Thu Mar 03 2016 - 21:24:20 CET