[Haskell-cafe] Memoization

Gerd M gerd_m1977 at hotmail.com
Fri Oct 7 14:39:13 EDT 2005


That's what I got from profiling, for some reason the memoized version is 
awfully slow:

Memoized version:
	total time  =      143.74 secs   (7187 ticks @ 20 ms)
	total alloc = 25,404,766,256 bytes  (excludes profiling overheads)

COST CENTRE                    MODULE               %time %alloc

memory                         Main               96.9   99.0
con2tag_State#                 Main                1.6    0.0


Non memoized version:
	total time  =        6.02 secs   (301 ticks @ 20 ms)
	total alloc = 990,958,296 bytes  (excludes profiling overheads)

COST CENTRE                    MODULE               %time %alloc

???                             Prob       61.1   73.1
f                    Main               10.3   17.8
con2tag_State#                 Main                7.6    0.0
sumProb                           Prob        6.6    1.5
tag2con_State#                 Main                3.3    1.9
con2tag_Out#                Main                2.7    0.0
tag2con_Out#                Main                2.3    1.9
sumProb                          Prob        2.0    3.0
stateTr                Main                2.0    0.0
mul                           Prob        1.7    0.8



>From: David Roundy <droundy at abridgegame.org>
>To: haskell-cafe at haskell.org
>Subject: Re: [Haskell-cafe] Memoization
>Date: Fri, 7 Oct 2005 14:12:39 -0400
>
>On Fri, Oct 07, 2005 at 06:08:48PM +0000, Gerd M wrote:
> > I still don't get it. I changed my code to structurally match your
> > example (see below) but the result is still the same...
>
>How are you timing your function?
>--
>David Roundy
>_______________________________________________
>Haskell-Cafe mailing list
>Haskell-Cafe at haskell.org
>http://www.haskell.org/mailman/listinfo/haskell-cafe

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



More information about the Haskell-Cafe mailing list