[Haskell-beginners] Help with slow algorithm

Diego Echeverri diegoeche at gmail.com
Fri May 14 21:41:06 EDT 2010

Thanks Brandon.

BTW... I just noticed I "Fucked up" the last gist.


On Fri, May 14, 2010 at 8:23 PM, Brandon S. Allbery KF8NH
<allbery at ece.cmu.edu> wrote:
> On May 14, 2010, at 21:13 , Diego Echeverri wrote:
>> I have learnt a bunch of things doing this exercise but I'm still
>> getting time-limit exception.
>> Here's the code: http://gist.github.com/401880
>> I believe that the bottleneck is in the addOne function (Specially in
>> the case where you have a bunch of nines). I have rewritten it to use
>> STArray but isn't fast enough.
>> doing: addOne $ B.replicate 500000 'a' takes too much time!
> http://www.haskell.org/haskellwiki/Performance/GHC is the place to start.
> --
> brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
> system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
> electrical and computer engineering, carnegie mellon university    KF8NH

Att: Diego Echeverri Saldarriaga

More information about the Beginners mailing list