[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: continuation efficiency
From: |
Martin Grabmueller |
Subject: |
Re: continuation efficiency |
Date: |
Sun, 08 Jul 2001 09:59:49 +0200 |
> From: address@hidden (Thomas Bushnell, BSG)
> Date: 07 Jul 2001 16:11:29 -0700
>
> Martin Grabmueller <address@hidden> writes:
>
> > call/cc does a full copy of the machine stack, to be able to install
> > it again when the continuation is invoked. This requires memory
> > allocation and copying, which is a bit slow.
> >
> > call/ec, on the other hand, does not need to preserve the stack, since
> > it only allows calls upwards in the call chain. Think of call/ec as
> > throw/catch and you'll see. So call/ec is less powerful, but faster
> > (in Guile, other Schemes may vary).
>
> This all depends on the *implementation*. The original post implied
> that call/ec was not a primitive. If it is implemented as a wrapper
> around call/cc, then how can it be more efficient?
Yes, but aren't we talking about the implementation in Guile here?
IIRC, you started this thread, asking about the performance of call/cc
in Guile, and Marius posted an example of call/ec, based on
catch/throw, _not_ based on call/cc. It was this implementation I was
talking about, which uses catch/throw---these are primitives, and
they are faster than call/cc *in Guile*.
If I mixed something up here, please clear it up.
Regards,
'martin
- continuation efficiency, Thomas Bushnell, BSG, 2001/07/05
- Re: continuation efficiency, Martin Grabmueller, 2001/07/06
- Re: continuation efficiency, Marius Vollmer, 2001/07/06
- Re: continuation efficiency, Thomas Bushnell, BSG, 2001/07/06
- Re: continuation efficiency, Martin Grabmueller, 2001/07/07
- Re: continuation efficiency, Thomas Bushnell, BSG, 2001/07/07
- Re: continuation efficiency, Neil Jerram, 2001/07/08
- Re: continuation efficiency, Klaus Schilling, 2001/07/08
- Re: continuation efficiency, Thomas Bushnell, BSG, 2001/07/08
- Re: continuation efficiency,
Martin Grabmueller <=
- Re: continuation efficiency, Thomas Bushnell, BSG, 2001/07/08
- Re: continuation efficiency, Marius Vollmer, 2001/07/07
- Re: continuation efficiency, Thomas Bushnell, BSG, 2001/07/07
- Re: continuation efficiency, Marius Vollmer, 2001/07/07
- Re: continuation efficiency, Thomas Bushnell, BSG, 2001/07/08
- Re: continuation efficiency, Marius Vollmer, 2001/07/08
- Re: continuation efficiency, Klaus Schilling, 2001/07/09
Re: continuation efficiency, Thomas Bushnell, BSG, 2001/07/06