* Re: overhead of GC in caml runtime?
@ 2000-07-26 9:06 Damien Doligez
0 siblings, 0 replies; 3+ messages in thread
From: Damien Doligez @ 2000-07-26 9:06 UTC (permalink / raw)
To: caml-list
>From: Norman Ramsey <nr@eecs.harvard.edu>
>Can anyone tell me approximately what fraction of time is
>spent in garbage collection, or even better, combined allocation and
>collection, in typical caml programs? Or how to get caml to report
>this information for a particular program of mine?
As far as memory management is concerned, there is no typical caml
program, so you really need to get the information for your program.
GC timers have been on my to-do list for some time now but they are
going to involve non-negligible overhead, and I expect they'll have
rather poor accuracy.
In the meantime, you could compile your program with "ocamlopt -p",
guess from the names of the functions which ones belong to memory
management, and add the percentages by hand...
-- Damien
^ permalink raw reply [flat|nested] 3+ messages in thread
* overhead of GC in caml runtime?
@ 2000-07-25 21:47 Norman Ramsey
2000-07-28 9:52 ` Xavier Leroy
0 siblings, 1 reply; 3+ messages in thread
From: Norman Ramsey @ 2000-07-25 21:47 UTC (permalink / raw)
To: caml-list
Can anyone tell me approximately what fraction of time is
spent in garbage collection, or even better, combined allocation and
collection, in typical caml programs? Or how to get caml to report
this information for a particular program of mine?
thanks,
Norman
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: overhead of GC in caml runtime?
2000-07-25 21:47 Norman Ramsey
@ 2000-07-28 9:52 ` Xavier Leroy
0 siblings, 0 replies; 3+ messages in thread
From: Xavier Leroy @ 2000-07-28 9:52 UTC (permalink / raw)
To: Norman Ramsey, caml-list
> Can anyone tell me approximately what fraction of time is
> spent in garbage collection, or even better, combined allocation and
> collection, in typical caml programs?
It depends how allocation-intensive your program is. For instance, the
Knuth-Bendix benchmark (which allocates quite a lot of short-lived
data) spends about 20% of its time in GC and allocation in the major
heap, when compiled with ocamlopt on a Pentium.
The percentage is lower for bytecode programs, because the collector
still runs at the same speed while the mutator runs more slowly
because of the interpretation overhead.
Most allocations in the minor heap are expanded in-line, so they can't
be measured.
Hope this helps,
- Xavier Leroy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2000-07-28 13:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-26 9:06 overhead of GC in caml runtime? Damien Doligez
-- strict thread matches above, loose matches on Subject: below --
2000-07-25 21:47 Norman Ramsey
2000-07-28 9:52 ` Xavier Leroy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox