Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Gc.compact surprisingly helpful
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-12-05 (17:06)
From: Damien Doligez <damien.doligez@i...>
Subject: Re: [Caml-list] Gc.compact surprisingly helpful

On 2009-12-04, at 20:09, Aaron Bohannon wrote:

> So in a 15 second run (with no
> idle time, as I said), it now does about 130 heap compactions instead
> of 3 and gets better total performance because of it, utterly defying
> my GC intuition.

What is the size of your heap?  Have you tried compacting only once
every 2, 3, 5, or 10 loops?

One possible explanation is that compaction will also compact the
free list into a few large blocks, which makes allocation faster.

-- Damien