caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Average cost of the OCaml GC
@ 2010-11-11  3:59 Jianzhou Zhao
  2010-11-11  9:08 ` [Caml-list] " Goswin von Brederlow
  0 siblings, 1 reply; 8+ messages in thread
From: Jianzhou Zhao @ 2010-11-11  3:59 UTC (permalink / raw)
  To: caml-list

Hi,

What is the average cost of the OCaml GC? I have a program that calls
'mark_slice' in 57% of the total execution time, and calls
'sweep_slice' in 21% of the total time, reported by Callgrind, which
is a profiling tool in Valgrind. 57% and 21% are the 'self cost' ---
the cost of the function itself ('Self Cost'), rather than the cost
including all called functions ('Inclusive Cost'). I guess
'mark_slice'  and  'sweep_slice'  are functions from OCaml GC. Are
these numbers normal?

My program calls both OCaml and C, which passes around C data types in
between. I also doubt if I defined the interface in an 'unefficient'
way that slows down the GC. Are there any rules in mind to make GC
work more efficiently?

Thanks.
-- 
Jianzhou


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

end of thread, other threads:[~2010-11-16 10:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-11  3:59 Average cost of the OCaml GC Jianzhou Zhao
2010-11-11  9:08 ` [Caml-list] " Goswin von Brederlow
2010-11-11 13:52   ` Jianzhou Zhao
2010-11-11 14:14     ` Michael Ekstrand
2010-11-11 20:11     ` Goswin von Brederlow
2010-11-12 17:27       ` Jianzhou Zhao
2010-11-12 21:54         ` ygrek
2010-11-16 10:02         ` Goswin von Brederlow

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).