Understanding the -A and the -H flags
marlowsd at gmail.com
Wed Feb 29 10:50:59 CET 2012
On 28/02/2012 15:59, Johan Tibell wrote:
> On Tue, Feb 28, 2012 at 12:57 AM, Simon Marlow<marlowsd at gmail.com> 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
>> 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:
> 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:
More information about the Glasgow-haskell-users