caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Gc.compact surprisingly helpful
@ 2009-12-04 19:09 Aaron Bohannon
  2009-12-04 19:31 ` [Caml-list] " Florian Hars
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Aaron Bohannon @ 2009-12-04 19:09 UTC (permalink / raw)
  To: caml-list

Hi,

I am trying to write a soft real time signal-processing application in
OCaml.  Running in a "simulation" mode, it spends no time blocking,
and uses an outermost loop that takes about 1/10 sec to run.  In order
to prevent irregular GC pauses, I decided to try inserting a call to
Gc.compact once per loop.  I was hoping the overall throughput
wouldn't suffer too badly.  To my very pleasant surprise, I found the
throughput *increased* by about 2%!!  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.

 - Aaron


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-12-08  8:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-04 19:09 Gc.compact surprisingly helpful Aaron Bohannon
2009-12-04 19:31 ` [Caml-list] " Florian Hars
2009-12-05 17:06 ` Damien Doligez
2009-12-08  3:30   ` Aaron Bohannon
2009-12-05 17:35 ` Xavier Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).