summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-11-15 21:04:49 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-11-15 21:04:49 -0800
commit33de6d75890811f7f47b92e412b8378c741c4e3f (patch)
tree25a496e694ee99cc4fd3a70f743d03b5acc59b0e
parentb9bf7b5a018127e82a55e5a714a9e17ab64818f4 (diff)
downloadtxr-33de6d75890811f7f47b92e412b8378c741c4e3f.tar.gz
txr-33de6d75890811f7f47b92e412b8378c741c4e3f.tar.bz2
txr-33de6d75890811f7f47b92e412b8378c741c4e3f.zip
Adjust some gen-gc array sizes.
Tuning some parameters by experimenting with timings. * gc.c (CHECKOBJ_VEC_SIZE): Reduce to 2*HEAP_SIZE; this doesn't have to be equal in size to FRESHOBJ_VEC_SIZE; entries into the checkobj array are not expected to be as frequent as in the freshobj array. (MUTOBJ_VEC_SIZE): On the other hand, at HEAP_SIZE/4, this may be too small. Increasing to 2*HEAP_SIZE. Overall, the storage for these arrays is reduced by over 25%, with seemingly better performance.
-rw-r--r--gc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index 34edb9f4..2bffb65f 100644
--- a/gc.c
+++ b/gc.c
@@ -46,8 +46,8 @@
#define PROT_STACK_SIZE 1024
#define HEAP_SIZE 16384
-#define CHECKOBJ_VEC_SIZE (8 * HEAP_SIZE)
-#define MUTOBJ_VEC_SIZE (HEAP_SIZE / 4)
+#define CHECKOBJ_VEC_SIZE (2 * HEAP_SIZE)
+#define MUTOBJ_VEC_SIZE (2 * HEAP_SIZE)
#define FULL_GC_INTERVAL 40
#define FRESHOBJ_VEC_SIZE (8 * HEAP_SIZE)
#define DFL_MALLOC_DELTA_THRESH (64L * 1024 * 1024)