summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Wellons <wellons@nullprogram.com>2017-10-06 10:11:57 -0400
committerChristopher Wellons <wellons@nullprogram.com>2017-10-06 10:11:57 -0400
commit6c3750fc0406ac136dbc7b2a78858cc5d8184ba9 (patch)
tree1ff72dcda18fa1fed42d923aff88a4d84962dc9c
parentec4397135ab840a27ca19e50a2c5143878e92ad0 (diff)
Tweak benchmark parameters
-rw-r--r--Makefile2
-rw-r--r--test/benchmark.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 2208e6d..2c59e54 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
CC = c99
-CFLAGS = -Wall -Wextra -O3 -g3
+CFLAGS = -Wall -Wextra -O3 -g3 -march=native
all: benchmark tests
benchmark: test/benchmark.c utf8.h test/utf8-encode.h test/bh-utf8.h
diff --git a/test/benchmark.c b/test/benchmark.c
index a94ebfc..b637e7b 100644
--- a/test/benchmark.c
+++ b/test/benchmark.c
@@ -10,8 +10,8 @@
#include "utf8-encode.h"
#include "bh-utf8.h"
-#define SECONDS 5
-#define BUFLEN 64 // MB
+#define SECONDS 6
+#define BUFLEN 8 // MB
static uint32_t
pcg32(uint64_t *s)
@@ -99,7 +99,7 @@ main(void)
} while (running);
double rate = n * (end - buffer) / (double)SECONDS / 1024 / 1024;
- printf("branchless: %f MB/s, %ld rounds, %ld errors\n", rate, n, errors);
+ printf("branchless: %f MB/s, %ld errors\n", rate, errors);
/* Benchmark Bjoern Hoehrmann's decoder */
running = 1;
@@ -122,7 +122,7 @@ main(void)
} while (running);
rate = n * (end - buffer) / (double)SECONDS / 1024 / 1024;
- printf("Hoehrmann: %f MB/s, %ld rounds, %ld errors\n", rate, n, errors);
+ printf("Hoehrmann: %f MB/s, %ld errors\n", rate, errors);
free(buffer);
}