4 ms·
Some schemes now have delimited continuations [1], and with Dybvig behind the wheel of Chez scheme I wouldn't be surprised if they show up there as well. It is
by Johnny_Brahms 9y ago
Some schemes now have delimited continuations [1], and with Dybvig behind the wheel of Chez scheme I wouldn't be surprised if they show up there as well.
It is a superior construct in every way. The performance and memory usage, even for the simplest usage, is way better, and because they are delimited they are easier to reason about.
1: guile, scheme48, racket's scheme lang (using rackets native delimited continuations together with their r6rs Lang)
- MycroftJones 9y agoThanks for the reference, I'll look into that. How does the performance and memory usage of deliminted continuations compare to implementing the control flow constructs directly?
- Johnny_Brahms 9y agoWhich are you comparing to? They are quite specialised, and are probably expensive as far as control operators go, but delimited continuations beat undelimited continuations every day of the week. I remember benchmarking the coroutine generator from srfi-125 (??), and already for the simplest case the delimited continuations in guile (compared to the undelimited ones in the reference implementation) were about 3x faster.