From c73bfd1501243ca599cf8d9ef5e747b3f123bd17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Thu, 3 Aug 2017 12:57:34 -0500 Subject: [PATCH] Changing BLOCK_SIZE default and allowing override. The larger BLOCK_SIZE is the less time it has to spend expanding memory, the faster it gets. --- src/list.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/list.c b/src/list.c index 4558cfd..09f9df7 100644 --- a/src/list.c +++ b/src/list.c @@ -22,7 +22,9 @@ /** * This is the number of elements by which the list expands. */ -#define BLOCK_SIZE 1024 +#ifndef BLOCK_SIZE +#define BLOCK_SIZE 132120576 +#endif int initList(List *restrict l) { l->list = malloc(sizeof(mpz_t) * BLOCK_SIZE);