Hello Donald,
Thursday, November 2, 2006, 2:21:31 PM, you wrote:
10-20 times difference is typical for GHC programs.
It's really more like 2-4x. Sometimes better than C.
Where's this huge figure coming from Bulat? If you have code that
behaves like this, you should report it.
are you
Hello isto,
Thursday, November 2, 2006, 1:16:55 AM, you wrote:
I have tried to do different things but now I'm stuck. unsafeRead
and unsafeWrite improved a bit the lazy (STUArray-version) and
why you think it's a lazy? :) ST monad is just the same as IO monad
internally, only types are
Hello Lennart,
Thursday, November 2, 2006, 4:34:04 AM, you wrote:
A big problem with the Mersenne Twister is the shifts. As has been
noted elsewhere, ghc doesn't do such a great job on those.
#ifdef __GLASGOW_HASKELL__
(I# a) # (I# b) = (I# (a `iShiftL#` b))
(I# a) # (I# b) = (I# (a
Hello Lennart,
Thursday, November 2, 2006, 6:04:39 AM, you wrote:
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
bulat.ziganshin:
Hello isto,
Thursday, November 2, 2006, 1:16:55 AM, you wrote:
I have tried to do different things but now I'm stuck. unsafeRead
and unsafeWrite improved a bit the lazy (STUArray-version) and
why you think it's a lazy? :) ST monad is just the same as IO monad
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
Hi all,
On HaWiki was an announcement of MersenneTwister made by Lennart
Augustsson. On a typical run to find out 1000th rnd num the output
is (code shown below):
$ time ./testMTla
Testing Mersenne Twister.
Result is [3063349438]
real0m4.925s
user0m4.856s
I was exercising with
Now, this will be hard to get close the the highly tuned C. Possibly its
doable.
The main tricks are documented here:
http://haskell.org/haskellwiki/Performance/GHC#Unboxed_types
Inspecting the Core to ensure the math is being inlined and unboxed will
be the most crucial issue, I'd imagine.
A big problem with the Mersenne Twister is the shifts. As has been
noted elsewhere, ghc doesn't do such a great job on those.
-- Lennart
On Nov 1, 2006, at 20:17 , Donald Bruce Stewart wrote:
Now, this will be hard to get close the the highly tuned C.
Possibly its
doable.
The
On 11/1/06, isto [EMAIL PROTECTED] wrote:
Hi all,
On HaWiki was an announcement of MersenneTwister made by Lennart
Augustsson. On a typical run to find out 1000th rnd num the output
is (code shown below):
$ time ./testMTla
Testing Mersenne Twister.
Result is [3063349438]
real0m4.925s
On 11/2/06, Lennart Augustsson [EMAIL PROTECTED] wrote:
A big problem with the Mersenne Twister is the shifts. As has been
noted elsewhere, ghc doesn't do such a great job on those.
Actually, the shifts are only evaluated once (hurrah for lazy
evaluation) and with -funfolding-use-threshold=16
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
lemmih:
On 11/1/06, isto [EMAIL PROTECTED] wrote:
Hi all,
On HaWiki was an announcement of MersenneTwister made by Lennart
Augustsson. On a typical run to find out 1000th rnd num the output
is (code shown below):
$ time ./testMTla
Testing Mersenne Twister.
Result is [3063349438]
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
14 matches
Mail list logo