From: Eijiro Sumii <eijiro_sumii@anet.ne.jp>
To: caml-list@inria.fr
Cc: Thomas.Fischbacher@Physik.Uni-Muenchen.DE, sumii@saul.cis.upenn.edu
Subject: Re: [Caml-list] how to "disable" GC?
Date: Sun, 13 Mar 2005 09:52:34 -0500 (EST) [thread overview]
Message-ID: <20050313.095234.125114068.eijiro_sumii@anet.ne.jp> (raw)
In-Reply-To: <Pine.LNX.4.61.0503131341420.8010@eiger.cip.physik.uni-muenchen.de>
From: "Thomas Fischbacher" <Thomas.Fischbacher@Physik.Uni-Muenchen.DE>
> > 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.)
>
> Quite in general, Cache hierarchy may be an issue here.
This is right, but let me clarify my question: Why is _anything_
heap-allocated, for example in the program below (given in my previous
message)? According to the assembly and intermediate code in
ocamlopt, there is indeed something heap-allocated in the else-clause
of tak, but I don't know what this is for... Are floting-point
numbers heap-allocated in ocamlopt on sparc??
| (**********************************************************************)
| 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 ()
| (**********************************************************************)
> setenv OCAMLRUNPARAM 's=1000'
> time ./tak.ocamlopt
11000000
3.54u 0.01s 0:03.56 99.7%
> setenv OCAMLRUNPARAM 's=1000000000'
> time ./tak.ocamlopt
11000000
6.83u 1.50s 0:08.80 94.6%
next prev parent reply other threads:[~2005-03-13 14:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-13 3:57 Eijiro Sumii
2005-03-13 12:52 ` [Caml-list] " Thomas Fischbacher
2005-03-13 14:52 ` Eijiro Sumii [this message]
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=20050313.095234.125114068.eijiro_sumii@anet.ne.jp \
--to=eijiro_sumii@anet.ne.jp \
--cc=Thomas.Fischbacher@Physik.Uni-Muenchen.DE \
--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