Hello Branimir,

Saturday, December 31, 2005, 4:55:51 AM, you wrote:
>>IOArrays is second-class citizens in GHC/Haskell. they are scanned on
>>_each_ GC, and this can substantially slow down program which uses
>>large IOArrays.

BM> Hm, there is Hans Boehm GC for C and C++ and I have gcmalloc and
BM> gcmalloc_atomic. Why this isn;t present in Haskel? gcmalloc_atomic is 
BM> usefull
BM> when allocating large arrays that does not contain any references/pointers.

because these arrays CONTAINS references :)  they reference all the
values inserted in the array so far

there is also IOUArray, which contains plain unboxed values of simple
types (Int, Float..) and don't slow down the program

>>.. writing this message i thought that reducing number of GCs can
>>speed up my program and your program too. so there is third variant -
>>using IOArray, but with "+RTS -A100m"
>>
>>
BM> Wow, that option almost doubled speed of HashTable program (memory leak
BM> remains).

use option "+RTS -sstderr" to see runtime of the program itself ("MUT
time") and "GC time" separately. see section "4.14.2. RTS options to
control the garbage collector" of GHC guide for more information


-- 
Best regards,
 Bulat                            mailto:[EMAIL PROTECTED]



_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to