+2019-05-21 Wilco Dijkstra <wdijkstr@arm.com>
+
+ * benchtests/bench-memcpy-random.c (do_one_test): Use medium iterations.
+ * benchtests/bench-memcpy-walk.c (test_main): Reduce alignment tests.
+ * benchtests/bench-memmem.c (do_one_test): Use small iterations.
+ * benchtests/bench-memmove-walk.c (test_main): Reduce alignment tests.
+ * benchtests/bench-memset-walk.c (test_main): Reduce alignment tests.
+ * benchtests/bench-strcasestr.c (do_one_test): Use small iterations.
+ * benchtests/bench-string.h (INNER_LOOP_ITERS): Increase iterations.
+ (INNER_LOOP_ITERS_MEDIUM): New define.
+ (INNER_LOOP_ITERS_SMALL): New define.
+ * benchtests/bench-strpbrk.c (do_one_test): Use medium iterations.
+ * benchtests/bench-strsep.c (do_one_test): Use small iterations.
+ * benchtests/bench-strspn.c (do_one_test): Use medium iterations.
+ * benchtests/bench-strstr.c (do_one_test): Use small iterations.
+ * benchtests/bench-strtok.c (do_one_test): Use small iterations.
+
2019-05-21 Adhemeval Zanella <adhemerval.zanella@linaro.org>
* sysdeps/unix/sysv/linux/powerpc/ipc_priv.h (SEMTIMEDOP_IPC_ARGS):
copy_t *copy, size_t n)
{
timing_t start, stop, cur;
- size_t iters = INNER_LOOP_ITERS * 20;
+ size_t iters = INNER_LOOP_ITERS_MEDIUM;
TIMING_NOW (start);
for (int i = 0; i < iters; ++i)
json_array_begin (&json_ctx, "results");
for (size_t i = START_SIZE; i <= MIN_PAGE_SIZE; i <<= 1)
{
- /* Test length alignments from 0-16 bytes. */
- for (int j = 0; j < 8; j++)
- {
- do_test (&json_ctx, i + j);
- do_test (&json_ctx, i + 16 - j);
- }
+ do_test (&json_ctx, i);
+ do_test (&json_ctx, i + 1);
}
json_array_end (&json_ctx);
do_one_test (impl_t *impl, const void *haystack, size_t haystack_len,
const void *needle, size_t needle_len, const void *expected)
{
- size_t i, iters = INNER_LOOP_ITERS;
+ size_t i, iters = INNER_LOOP_ITERS_SMALL;
timing_t start, stop, cur;
TIMING_NOW (start);
/* Non-overlapping buffers. */
for (size_t i = START_SIZE; i <= MIN_PAGE_SIZE; i <<= 1)
{
- /* Test length alignments from 0-16 bytes. */
- for (int j = 0; j < 8; j++)
- {
- do_test (&json_ctx, i + j, false);
- do_test (&json_ctx, i + 16 - j, false);
- }
+ do_test (&json_ctx, i, false);
+ do_test (&json_ctx, i + 1, false);
}
/* Overlapping buffers. */
for (size_t i = START_SIZE; i <= MIN_PAGE_SIZE; i <<= 1)
{
- /* Test length alignments from 0-16 bytes. */
- for (int j = 0; j < 8; j++)
- {
- do_test (&json_ctx, i + j, true);
- do_test (&json_ctx, i + 16 - j, true);
- }
+ do_test (&json_ctx, i, true);
+ do_test (&json_ctx, i + 1, true);
}
json_array_end (&json_ctx);
json_array_begin (&json_ctx, "results");
for (i = START_SIZE; i <= MIN_PAGE_SIZE; i <<= 1)
- /* Test length alignments from 0-16 bytes. */
- for (int j = 0; j < i && j < 16; j++)
- do_test (&json_ctx, 65, i + j);
+ {
+ do_test (&json_ctx, 65, i);
+ do_test (&json_ctx, 65, i + 1);
+ }
for (i = START_SIZE; i <= MIN_PAGE_SIZE; i <<= 1)
- for (int j = 0; j < i && j < 16; j++)
- do_test (&json_ctx, 0, i + j);
+ {
+ do_test (&json_ctx, 0, i);
+ do_test (&json_ctx, 0, i + 1);
+ }
json_array_end (&json_ctx);
json_attr_object_end (&json_ctx);
static void
do_one_test (impl_t *impl, const char *s1, const char *s2, char *exp_result)
{
- size_t i, iters = INNER_LOOP_ITERS;
+ size_t i, iters = INNER_LOOP_ITERS_SMALL;
timing_t start, stop, cur;
TIMING_NOW (start);
# define OPT_RANDOM 10001
# define OPT_SEED 10002
-# define INNER_LOOP_ITERS 64
+# define INNER_LOOP_ITERS 8192
+# define INNER_LOOP_ITERS_MEDIUM 1024
+# define INNER_LOOP_ITERS_SMALL 32
int ret, do_srandom;
unsigned int seed;
do_one_test (impl_t *impl, const CHAR *s, const CHAR *rej, RES_TYPE exp_res)
{
RES_TYPE res = CALL (impl, s, rej);
- size_t i, iters = INNER_LOOP_ITERS;
+ size_t i, iters = INNER_LOOP_ITERS_MEDIUM;
timing_t start, stop, cur;
if (res != exp_res)
static void
do_one_test (impl_t * impl, const char *s1, const char *s2)
{
- size_t i, iters = INNER_LOOP_ITERS;
+ size_t i, iters = INNER_LOOP_ITERS_SMALL;
timing_t start, stop, cur;
TIMING_NOW (start);
static void
do_one_test (impl_t *impl, const CHAR *s, const CHAR *acc, size_t exp_res)
{
- size_t res = CALL (impl, s, acc), i, iters = INNER_LOOP_ITERS;
+ size_t res = CALL (impl, s, acc), i, iters = INNER_LOOP_ITERS_MEDIUM;
timing_t start, stop, cur;
if (res != exp_res)
static void
do_one_test (impl_t *impl, const char *s1, const char *s2, char *exp_result)
{
- size_t i, iters = INNER_LOOP_ITERS;
+ size_t i, iters = INNER_LOOP_ITERS_SMALL;
timing_t start, stop, cur;
char *res;
static void
do_one_test (impl_t * impl, const char *s1, const char *s2)
{
- size_t i, iters = INNER_LOOP_ITERS;
+ size_t i, iters = INNER_LOOP_ITERS_SMALL;
timing_t start, stop, cur;
TIMING_NOW (start);
for (i = 0; i < iters; ++i)