<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On Jun 27, 2007, at 8:35 AM, Marc Feeley wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">On 25-Jun-07, at 4:27 PM, naruto canada wrote:</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> <BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Does gambit-c have call/ec? Thanks.</FONT></P> </BLOCKQUOTE><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Call/ec is not predefined.<SPAN class="Apple-converted-space">  </SPAN>You can define it yourself like this:</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">(define call/ec call/cc)</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Obviously, in this case the implementation of call/ec is not as fast <SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">as it could be.<SPAN class="Apple-converted-space">  </SPAN>On the other hand, Gambit's implementation of <SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">continuations is one of the most efficient.<SPAN class="Apple-converted-space">  </SPAN>For example, on the ctak <SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">benchmark which uses call/cc extensively, Gambit is about 2 orders of <SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">magnitude faster than MzScheme.<SPAN class="Apple-converted-space">  </SPAN>It would be interesting to see how <SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">MzScheme fairs when call/cc is replaced by call/ec in that benchmark <SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">(I can't run the test because my usual work machine is out of <SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">order).<SPAN class="Apple-converted-space">  </SPAN>See <A href="http://www.iro.umontreal.ca/~gambit/bench.html">http://www.iro.umontreal.ca/~gambit/bench.html</A> for other <SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">benchmark results (fibc also uses continuations extensively).</FONT></P> </BLOCKQUOTE></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>On a 1.66GHz Intel Core Duo Mac Mini, I just tried ctak and fibc on MzScheme v370 with call/cc and call/ec and I get these relative execution times:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><FONT class="Apple-style-span" face="Courier">       Gambit  MzScheme MzScheme</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier">       call/cc  call/cc  call/ec</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier">ctak     1.0    113.6      7.1</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier">fibc     1.0     56.1      5.5</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier"><BR class="khtml-block-placeholder"></FONT></DIV><DIV>So call/ec improves the MzScheme execution times by an order of magnitude.  The resulting performance is still quite far from using plain call/cc with Gambit-C.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Marc</DIV><DIV><BR class="khtml-block-placeholder"></DIV></BODY></HTML>