Hi guys! Since a while I'm playing around with JHC and wanted to ask something about the garbage collector(s). First, what is this "Boehm" thing? Is it some other garbage collector written by somebody else? I can't run it on my machine. The other thing: When I compile this* program with GC enabled, the output is random crap or it segfaults. What happens here? I should dig into it deeper. Possibly someone can give my some adivise, I guess it's mostly a matter of the arrays or something else. Yours, Robert Clausecker *: The program is available here: https://github.com/fuzxxl/BWInf in the folder Aufgabe4. Make shure to checkout the "performance" branch. I changed some stuff to make it compile with JHC, and reverted it afterwards. Sorry, as this was pure homework for some competition, I coded in German. I can try to translate it, but maybe it's understandable as is. The program calculates the expected result of some game or may play for n times. Given no parameters, it will analyze, with "-n -c ###" it will play n games. On GHC, it will run in constant space and 1000000 games are done in about 6 seconds. JHC is much worse.
Hi, The boehm collector is a pure C garbage collector which can be linked into the output of jhc, it can be found here (http://www.hpl.hp.com/personal/Hans_Boehm/gc/) but many distrubtions contain it pre-packaged. It is the GC used by many language implementations, such as the gnu java implementation. Although it works, it is not well optimized for haskell and is quite slow so was mainly used as a debugging tool by me and as an option to get things to work that just wouldn't otherwise. the "jgc" gc is a native one implemented by jhc and will be the standard one going forward. It is not enabled by default yet as there are a couple cases it can't handle (collecting ForeignPtrs and very large arrays) but I am working on them. John On Mon, Dec 20, 2010 at 1:55 AM, Robert Clausecker <fuzxxl@gmail.com> wrote:
Hi guys!
Since a while I'm playing around with JHC and wanted to ask something about the garbage collector(s). First, what is this "Boehm" thing? Is it some other garbage collector written by somebody else? I can't run it on my machine.
The other thing: When I compile this* program with GC enabled, the output is random crap or it segfaults. What happens here? I should dig into it deeper. Possibly someone can give my some adivise, I guess it's mostly a matter of the arrays or something else.
Yours, Robert Clausecker
*: The program is available here: https://github.com/fuzxxl/BWInf in the folder Aufgabe4. Make shure to checkout the "performance" branch. I changed some stuff to make it compile with JHC, and reverted it afterwards. Sorry, as this was pure homework for some competition, I coded in German. I can try to translate it, but maybe it's understandable as is. The program calculates the expected result of some game or may play for n times. Given no parameters, it will analyze, with "-n -c ###" it will play n games. On GHC, it will run in constant space and 1000000 games are done in about 6 seconds. JHC is much worse.
_______________________________________________ jhc mailing list jhc@haskell.org http://www.haskell.org/mailman/listinfo/jhc
participants (2)
-
John Meacham -
Robert Clausecker