
On 28/02/2012 15:59, Johan Tibell wrote:
On Tue, Feb 28, 2012 at 12:57 AM, Simon Marlow
wrote: Ah, so I see where your confusion arises - this assumption is not true in general. Just discard the assumption, and I think everything will make more sense.
Picking a size for -A around the L2 cache is often a good idea, but not always. GHC defaults to -A512K, but programs that benefit from much larger sizes are quite common. For more about the tradeoff, see my SO answer here:
http://stackoverflow.com/questions/3171922/ghcs-rts-options-for-garbage-coll...
Thanks for the explanation.
One has to be very careful in selecting the size of the allocation area in benchmarks. If the allocation area is large enough the GC might not need to run at all for the duration of the benchmark, while in a real program it would run.
It is a problem, yes. You also have to be careful when comparing two benchmarks runs that one didn't do an extra GC, because that can skew the results against it. I'm fairly sure the GC community have looked into this problem, but I don't know of any references off hand. Trawling Richard Jones' GC bibliography might turn up something: http://www.cs.kent.ac.uk/people/staff/rej/gcbib/ Cheers, Simon