diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-03-29 20:35:10 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-03-29 20:35:10 -0700 |
commit | 68ec8b89dca3da4517cd32a3c551747b600bc0d8 (patch) | |
tree | f9e917a2f3ff96ff4fb9a428593591ee4a5c44bc | |
parent | 4683b7cf15c4b434a4ffe74d9eeae0f94ef334bf (diff) | |
download | txr-68ec8b89dca3da4517cd32a3c551747b600bc0d8.tar.gz txr-68ec8b89dca3da4517cd32a3c551747b600bc0d8.tar.bz2 txr-68ec8b89dca3da4517cd32a3c551747b600bc0d8.zip |
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.
-rw-r--r-- | unwind.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |