caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* how to "disable" GC?
@ 2005-03-13  3:57 Eijiro Sumii
  2005-03-13 12:52 ` [Caml-list] " Thomas Fischbacher
  2005-03-13 23:12 ` Damien Doligez
  0 siblings, 2 replies; 8+ messages in thread
From: Eijiro Sumii @ 2005-03-13  3:57 UTC (permalink / raw)
  To: caml-list; +Cc: sumii

Hello,

I'm trying some very unfair:-) comparisons between OCaml and MinCaml
(min-caml.sf.net), and wondering how to _disable_ GC in OCaml (on
SPARC).  I've tried

  setenv OCAMLRUNPARAM 's=1000000000,v=0x1ff'

and its variants, but none of them seem to stop GC from happening -
and once it happens, it's MUCH slower of course!  By the way, the
machine has 8GB main memory.

So, my questions are:

1. How does the GC happen at all when the minor heap is so huge?  The
   programs don't seem to use so much memory anyway...

2. Some programs get much slower for larger heaps, even though they
   don't seem to trigger any GC.  An example is such programs is given
   below.  Why is this?  (There also exist programs that are not
   affected at all, so this is not because of the initialization
   overhead of the runtime system.)

(**********************************************************************)
let rec tak x y z =
  if y >= x then z else
  tak (tak (x -. 1.0) y z) (tak (y -. 1.0) z x) (tak (z -. 1.0) x y) in
let n = 10.0 in
print_int (int_of_float (1000000.0 *. tak (n *. 3.0) (n *. 2.0) (n *. 1.0)));
print_newline ()
(**********************************************************************)

Thanks in advance,

--
Eijiro Sumii (http://www.cis.upenn.edu/~sumii/)
Department of Computer and Information Science, University of Pennsylvania


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

end of thread, other threads:[~2005-03-15 19:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-13  3:57 how to "disable" GC? Eijiro Sumii
2005-03-13 12:52 ` [Caml-list] " Thomas Fischbacher
2005-03-13 14:52   ` Eijiro Sumii
2005-03-13 16:17     ` Kurt Welgehausen
2005-03-13 17:41       ` Eijiro Sumii
2005-03-13 23:12 ` Damien Doligez
2005-03-14 15:17   ` Ken Rose
2005-03-15 19:39     ` Damien Doligez

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