[Haskell-cafe] How to improve speed? (MersenneTwister is several times slower than C version)

Lennart Augustsson lennart at augustsson.net
Thu Nov 2 08:18:45 EST 2006


Oh, sorry, I thought your version was a rewritten version of mine. :)
The names are so similar, after all.

On Nov 2, 2006, at 02:26 , isto wrote:

> Hi,
>
> When writing IO version, I wasn't aware of other twister versions,
> and the only reason is/was that it was easiest to me and that I knew
> (believed) that plain lists would have been inefficient.  I just  
> wanted
> to see and learn, how close to C version this can be made.  (And still
> do.)
>
> There were some good suggestions on this thread - next I'll try
> to get grasp on how to apply the suggestions and do something...
>
> br, Isto
>
> ke, 2006-11-01 kello 22:04 -0500, Lennart Augustsson kirjoitti:
>> The whole point of writing the Mersenne Twister was that I wanted to
>> show how a stateful computation could be encapsulated in the ST monad
>> and none of it showing up outside.  This aspect of the code is
>> totally gone now when everything is in the IO monad.  Is there some
>> good reason to have it in the IO monad?
>>
>



More information about the Haskell-Cafe mailing list