commit 30dfd167de3b50c2d0e9d6943b334b9121b2967c
Author: Mattias Andrée <maandree_AT_kth.se>
AuthorDate: Sun Apr 24 01:45:49 2016 +0200
Commit: Mattias Andrée <maandree_AT_kth.se>
CommitDate: Sun Apr 24 01:45:49 2016 +0200
bench/benchmark-func.c: add support for more functions
Signed-off-by: Mattias Andrée <maandree_AT_kth.se>
diff --git a/bench/benchmark-func.c b/bench/benchmark-func.c
index c0bc2d8..2acd9f8 100644
--- a/bench/benchmark-func.c
+++ b/bench/benchmark-func.c
_AT_@ -3,6 +3,7 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
+#include <unistd.h>
#ifdef BENCHMARK_LIB
# include BENCHMARK_LIB
_AT_@ -120,9 +121,8 @@ gettime(size_t m)
PREINSTRUCTION;\
k = f->measurements;\
while (k--) {\
- for (j = f->runs / 10; j--;) {\
- INSTRUCTION;\
- }\
+ INSTRUCTION;\
+ INSTRUCTION;\
j = f->runs;\
start = rdtsc();\
while (j--) {\
_AT_@ -137,58 +137,58 @@ gettime(size_t m)
(void) bs;\
}
-FUNCTION_2D(bench_zset, zset(temp, *a),)
-FUNCTION_2D(bench_zneg, zneg(temp, *a),)
-FUNCTION_2D(bench_zabs, zabs(temp, *a),)
-FUNCTION_2D(bench_self_zneg, zneg(*a, *a),)
-FUNCTION_2D(bench_self_zabs, zabs(*a, *a),)
-FUNCTION_2D(bench_zadd_unsigned, zadd_unsigned(temp, *a, temp2),)
-FUNCTION_2D(bench_zsub_unsigned, zsub_unsigned(temp, *a, temp2),)
-FUNCTION_2D(bench_zadd, zadd(temp, *a, temp2),)
-FUNCTION_2D(bench_zsub, zsub(temp, *a, temp2),)
-FUNCTION_2D(bench_zand, zand(temp, *a, temp2),)
-FUNCTION_2D(bench_zor, zor(temp, *a, temp2),)
-FUNCTION_2D(bench_zxor, zxor(temp, *a, temp2),)
-FUNCTION_2D(bench_znot, znot(temp, *a),)
-FUNCTION_2D(bench_zeven, zeven(*a),)
-FUNCTION_2D(bench_zodd, zodd(*a),)
-FUNCTION_2D(bench_zeven_nonzero, zeven_nonzero(*a),)
-FUNCTION_2D(bench_zodd_nonzero, zodd_nonzero(*a),)
-FUNCTION_2D(bench_zzero, zzero(*a),)
-FUNCTION_2D(bench_zsignum, zsignum(*a),)
-FUNCTION_2D(bench_zbits, zbits(*a),)
-FUNCTION_2D(bench_zlsb, zlsb(*a),)
-FUNCTION_2D(bench_zswap, zswap(temp, *a),)
-FUNCTION_2D(bench_zcmpmag, zcmpmag(temp2, *a),)
-FUNCTION_2D(bench_zcmp, zcmp(temp2, *a),)
-FUNCTION_2D(bench_sqr_zmul, zmul(temp, *a, temp2),)
-FUNCTION_2D(bench_zsqr, zsqr(temp, *a),)
-FUNCTION_2D(bench_zstr_length, zstr_length(*a, 10),)
-FUNCTION_2D(bench_zstr, zstr(*a, buf),)
-FUNCTION_2D(bench_zsave, zsave(*a, buf),)
-FUNCTION_2D(bench_zload, zload(temp, buf), zsave(*a, buf))
+FUNCTION_2D(bench_zset, zset(temp, *a),)
+FUNCTION_2D(bench_zneg, zneg(temp, *a),)
+FUNCTION_2D(bench_zabs, zabs(temp, *a),)
+FUNCTION_2D(bench_self_zneg, zneg(*a, *a),)
+FUNCTION_2D(bench_self_zabs, zabs(*a, *a),)
+FUNCTION_2D(bench_zadd_unsigned, zadd_unsigned(temp, *a, temp2),)
+FUNCTION_2D(bench_zsub_unsigned, zsub_unsigned(temp, *a, temp2),)
+FUNCTION_2D(bench_zadd, zadd(temp, *a, temp2),)
+FUNCTION_2D(bench_zsub, zsub(temp, *a, temp2),)
+FUNCTION_2D(bench_zand, zand(temp, *a, temp2),)
+FUNCTION_2D(bench_zor, zor(temp, *a, temp2),)
+FUNCTION_2D(bench_zxor, zxor(temp, *a, temp2),)
+FUNCTION_2D(bench_znot, znot(temp, *a),)
+FUNCTION_2D(bench_zeven, zeven(*a),)
+FUNCTION_2D(bench_zodd, zodd(*a),)
+FUNCTION_2D(bench_zeven_nonzero, zeven_nonzero(*a),)
+FUNCTION_2D(bench_zodd_nonzero, zodd_nonzero(*a),)
+FUNCTION_2D(bench_zzero, zzero(*a),)
+FUNCTION_2D(bench_zsignum, zsignum(*a),)
+FUNCTION_2D(bench_zbits, zbits(*a),)
+FUNCTION_2D(bench_zlsb, zlsb(*a),)
+FUNCTION_2D(bench_zswap, zswap(temp, *a),)
+FUNCTION_2D(bench_zcmpmag, zcmpmag(temp2, *a),)
+FUNCTION_2D(bench_zcmp, zcmp(temp2, *a),)
+FUNCTION_2D(bench_sqr_zmul, zmul(temp, *a, temp2),)
+FUNCTION_2D(bench_zsqr, zsqr(temp, *a),)
+FUNCTION_2D(bench_zstr_length, zstr_length(*a, 10),)
+FUNCTION_2D(bench_zstr, zstr(*a, buf),)
+FUNCTION_2D(bench_zsave, zsave(*a, buf),)
+FUNCTION_2D(bench_zload, zload(temp, buf), zsave(*a, buf))
+FUNCTION_2D(bench_zbset_set, zbset(temp, *a, 2, 1),)
+FUNCTION_2D(bench_zbset_clear, zbset(temp, *a, 2, 0),)
+FUNCTION_2D(bench_zbset_flip, zbset(temp, *a, 2, -1),)
+FUNCTION_2D(bench_self_zbset_set, zbset(temp2, temp2, 2, 1),)
+FUNCTION_2D(bench_self_zbset_clear, zbset(temp2, temp2, 2, 0),)
+FUNCTION_2D(bench_self_zbset_flip, zbset(temp2, temp2, 2, -1),)
+FUNCTION_2D(bench_zbtest, zbtest(*a, 2),)
+FUNCTION_2D(bench_zptest, zptest(temp, *a, 5),)
+FUNCTION_2D(bench_zsets, zsets(temp, buf), zstr(*a, buf))
+FUNCTION_2D(bench_zlsh, zlsh(temp, *a, 1),)
+FUNCTION_2D(bench_zrsh, zrsh(temp, *a, 1),)
/* TODO
- zlsh
- zrsh
ztrunc
self_ztrunc
zsplit
- zbset_set
- zbset_clear
- zbset_flip
- self_zbset_set
- self_zbset_clear
- self_zbset_flip
- zbtest
zgcd
- zsets
zpow
zpowu
zmodpow
zmodpowu
zrand
- zptest
zdiv
zmod
zdivmod
Received on Sun Apr 24 2016 - 01:45:56 CEST
This archive was generated by hypermail 2.3.0
: Sun Apr 24 2016 - 01:48:14 CEST