From: Eijiro Sumii <eijiro_sumii@anet.ne.jp>
To: caml-list@inria.fr
Cc: sumii@saul.cis.upenn.edu
Subject: how to "disable" GC?
Date: Sat, 12 Mar 2005 22:57:25 -0500 (EST) [thread overview]
Message-ID: <20050312.225725.125114910.eijiro_sumii@anet.ne.jp> (raw)
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
next reply other threads:[~2005-03-13 3:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-13 3:57 Eijiro Sumii [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050312.225725.125114910.eijiro_sumii@anet.ne.jp \
--to=eijiro_sumii@anet.ne.jp \
--cc=caml-list@inria.fr \
--cc=sumii@saul.cis.upenn.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox