
I'm trying to use newArray to allocate something that has 100M unboxed doubles. It takes quite a few seconds to do so on GHC 6.10.2. But doing the same thing (and initialize all to 0) in C returns immediately. Setting RTS heap size doesn't help. Does anybody happen to know why? -- Regards, Paul Liu Yale Haskell Group http://www.haskell.org/yale

ninegua:
I'm trying to use newArray to allocate something that has 100M unboxed doubles. It takes quite a few seconds to do so on GHC 6.10.2. But doing the same thing (and initialize all to 0) in C returns immediately. Setting RTS heap size doesn't help. Does anybody happen to know why?
Use newArray_ to avoid initialising it.

wow, using newArray_ and initialize the whole thing myself is much
faster than newArray. But why?
On 9/18/09, Don Stewart
ninegua:
I'm trying to use newArray to allocate something that has 100M unboxed doubles. It takes quite a few seconds to do so on GHC 6.10.2. But doing the same thing (and initialize all to 0) in C returns immediately. Setting RTS heap size doesn't help. Does anybody happen to know why?
Use newArray_ to avoid initialising it.
-- Regards, Paul Liu Yale Haskell Group http://www.haskell.org/yale
participants (2)
-
Don Stewart
-
Paul L