[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: |
Sat, 07 Jul 2001 10:23:56 +0200 |
> From: address@hidden (Thomas Bushnell, BSG)
> Date: 06 Jul 2001 17:53:35 -0700
>
> Marius Vollmer <address@hidden> writes:
>
> > Actually, I think we should have call/ec as a builtin.
>
> If call/ec is not already a builtin, how is it actually faster than
> call/cc?
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).
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 <=
- 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, 2001/07/08
- 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