From 9e84c4f3f1796c23c94ad10525da4966115786b5 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 29 Mar 2018 20:35:10 -0700 Subject: continuations: don't fixup pointers if delta is zero. * unwind.c (revive_cont): If delta is zero, skip the loop. This is an important optimization. The delta zero case can occur frequently; I have observed it. --- unwind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unwind.c b/unwind.c index a1f0989d..b89bf991 100644 --- a/unwind.c +++ b/unwind.c @@ -892,7 +892,7 @@ static val revive_cont(val dc, val arg) memcpy(space, cont->stack, cont->size); - for (ptr = space; ptr < space + cont->size; ptr += sizeof (cnum)) + for (ptr = space; delta && ptr < space + cont->size; ptr += sizeof (cnum)) { uint_ptr_t *wordptr = coerce(uint_ptr_t *, ptr); uint_ptr_t word; -- cgit v1.2.3