diff options
| author | Mattias Andrée <maandree@kth.se> | 2016-03-12 20:41:10 +0100 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2016-03-12 20:41:22 +0100 |
| commit | fa8d9c7e2be2b8953d1d3f2732c34741debd133a (patch) | |
| tree | 12b9312eb979c8fa9e1208696d2cec23e3bbedb9 /src/zsets.c | |
| parent | 64-bit chars out-perform 32-bit chars on almost all operations, and on all expensive operations (diff) | |
| download | libzahl-fa8d9c7e2be2b8953d1d3f2732c34741debd133a.tar.gz libzahl-fa8d9c7e2be2b8953d1d3f2732c34741debd133a.tar.bz2 libzahl-fa8d9c7e2be2b8953d1d3f2732c34741debd133a.tar.xz | |
64 bits (severely) outshines 16 bits and 8 bits in performance: do some cleanup
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/zsets.c')
| -rw-r--r-- | src/zsets.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/zsets.c b/src/zsets.c index fb44db4..d4bedc0 100644 --- a/src/zsets.c +++ b/src/zsets.c @@ -26,7 +26,6 @@ zsets(z_t a, const char *str) SET_SIGNUM(a, 0); -#if 1 zset(libzahl_tmp_str_num, libzahl_const_1e19); switch ((str_end - str) % 19) { while (*str) { @@ -44,24 +43,6 @@ zsets(z_t a, const char *str) zadd(a, a, libzahl_tmp_str_num); } } -#else - zset(libzahl_tmp_str_num, libzahl_const_1); - switch ((str_end - str) % 9) { - while (*str) { - zmul(a, a, libzahl_const_1e9); - temp = 0; -#define X(n)\ - case n:\ - temp *= 10, temp += *str++ & 15; - X(0) X(8) X(7) X(6) X(5) X(4) X(3) X(2) X(1) -#undef X - if (!temp) - continue; - libzahl_tmp_str_num->chars[0] = temp; - zadd(a, a, libzahl_tmp_str_num); - } - } -#endif if (neg) SET_SIGNUM(a, -zsignum(a)); |
