~ chicken-core (chicken-5) f7787a7a6b15eb09d4f87f17bb19584d6437a41e
commit f7787a7a6b15eb09d4f87f17bb19584d6437a41e 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:22 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 5d2863bd..ada11f14 100644 --- a/runtime.c +++ b/runtime.c @@ -2795,7 +2795,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