~ chicken-core (chicken-5) 62da2e3d26e1a4882d54d17922cdd1523f66f066
commit 62da2e3d26e1a4882d54d17922cdd1523f66f066 Author: Evan Hanson <evhan@foldling.org> AuthorDate: Mon Sep 5 22:37:39 2016 +1200 Commit: Evan Hanson <evhan@foldling.org> CommitDate: Sat Sep 10 22:58:18 2016 +1200 Only shrink temp stack when new size is "significantly" smaller This is to reduce, however slightly, the number of resizes that occur when a program sees consistently diverse size requirements between GC cycles. diff --git a/runtime.c b/runtime.c index 1b39f46a..5c2eab57 100644 --- a/runtime.c +++ b/runtime.c @@ -3203,7 +3203,7 @@ void C_save_and_reclaim(void *trampoline, int n, C_word *av) assert(C_temporary_stack == C_temporary_stack_bottom); /* Don't *immediately* slam back to default size */ - if (new_size < temporary_stack_size) + if (new_size < temporary_stack_size / 4) new_size = temporary_stack_size >> 1; if (new_size != temporary_stack_size) {Trap