[plt-scheme] Re: From hash-table to generator

From: Kyle Smith (airfoil at bellsouth.net)
Date: Sun May 13 13:05:50 EDT 2007

Jens Axel Søgaard <jensaxel at ...> writes:

> 
> Eli Barzilay skrev:
>  > On May 11, Jens Axel Søgaard wrote:
>  >> 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

Hi Jens,

These are the times I got for each of the algorithms presented so far on
this thread, using this mornings svn trunk built from source.

;'list-version 10 by 100000 * NOTE: ORDER OF MAGNITUDE LARGER SET *
;==>cpu time: 670 real time: 677 gc time: 186
;'threaded-version 10 by 10000
;==>cpu time: 1464 real time: 2452 gc time: 0
;'swindle->generator 10 by 10000
;==>cpu time: 1930 real time: 1969 gc time: 945
;'call/cc-version 10 by 10000
;==>cpu time: 1980 real time: 2029 gc time: 946
;'shift-reset-w-match 10 by 10000
;==>cpu time: 4756 real time: 4892 gc time: 2656
;'shift-reset-let 10 by 10000
;==>cpu time: 4805 real time: 4912 gc time: 2694


I ran it with debug off on a Mac Pro.  The list version is at least an order 
of magnitude faster than any other algorithm presented.  The threaded, 
swindle and call/cc algorithms all come in close to each other as a group 
in second  place.  Finally, it still appears that for whatever reason, maybe 
Matthew can speak to this, the algorithms employing delimited 
continuations are both close, and as a group take third place. 

Interestingly, the total run time is correlated tightly to the gc times,  
except for Eli's swindle algorithm, which has a stunning gc time of zero. 

Thought you would be interested. 

--kyle






Posted on the users mailing list.