[plt-scheme] From hash-table to generator

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri May 11 19:40:15 EDT 2007

At Fri, 11 May 2007 17:05:42 +0200, Jens Axel Søgaard wrote:
> Jens Axel Søgaard skrev:
> 
> > In my sample application I get:
> > 
> >   Above version:    cpu time: 23594 real time: 25469 gc time: 3389
> >   Call/cc version:  cpu time: 18125 real time: 18344 gc time: 11515
> >   List version:     cpu time: 1843 real time: 1843 gc time: 578
> 
> And the shift/reset version:
> 
>                        cpu time: 115719 real time: 118140 gc time: 93442
> 
> Hmm. That seems a bit much compared to the call/cc version.

A bug had crept into the implementation of delimited continuations so
that they chained improperly (i.e, they weren't always GCed when they
should be).

With the bug fix now in SVN, my guess is that your `shift' version will
run with about the same performance as the `call/cc' version.

Matthew



Posted on the users mailing list.