Welcome to little lamb

Code » test-hashes » commit 1f2db2e

Switch from hashing 10 MiB to 64 KiB

author Olivier Brunel
2023-02-03 16:51:49 UTC
committer Olivier Brunel
2023-02-03 16:51:49 UTC
parent ef2850e24cbd55e63c688dc8a2917e40cb4d545e

Switch from hashing 10 MiB to 64 KiB

Overall differences might not be that different, but results might be
more interesting when one intend to only hash "small" blocks of data.

src/test.c +6 -0

diff --git a/src/test.c b/src/test.c
index e8e3818..8dd21f7 100644
--- a/src/test.c
+++ b/src/test.c
@@ -29,9 +29,15 @@ extern void update(const char *msg, size_t size);
 extern void final(unsigned char *md);
 extern int hashlen(void);
 
+#if 0
 #define SIZE    (512 << 10)
 #define BLOCKS  20
 #define ITER    100
+#else
+#define SIZE    (64 << 10)
+#define BLOCKS  1
+#define ITER    1000
+#endif
 int main(void)
 {
     struct timespec ts1, ts2;