From: "Quôc Peyrot" <chojin@lrde.epita.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] time profiling and nested function inlining
Date: Thu, 7 Dec 2006 02:43:01 -0800 [thread overview]
Message-ID: <8E63D477-08E0-485C-A250-6E90A699A253@lrde.epita.fr> (raw)
In-Reply-To: <613020E3-8A60-4FA9-975E-F2AD5E0E28DB@epfl.ch>
On Dec 6, 2006, at 12:55 AM, Daniel Bünzli wrote:
> If you have the development tools installed, you can profile on
> macosx using shark (you don't even need to compile with -p). Invoke
> it from the command line on your executable as follows:
>
> > shark -i -1 -q ./yourexec.opt args
>
> This will write a .mshark file in the directory that you can open
> with Shark.app.
>
> > open *.mshark
Thanks, it worked like a charm.
Anyone for my second question from my original email (about the
nested function)?
The more I look at the assembly output, the more I am puzzled.
Another simple example:
for i = 0 to len - 1 do
for j = 0 to len - 1 do
array.(i).(j) <- 0;
done;
done;
doesn't seem to be equivalent to
for i = 0 to len - 1 do
let array_i = array.(i) in
for j = 0 to len - 1 do
array_i.(j) <- 0;
done;
done;
in the former, the compiler doesn't detect the invariant "array.(i)"
and keeps it inside the inner loop.
I tried to pass -ccopt -O3 to ocamlopt but it didn't seem to change
anything.
--
Best Regards,
Quôc
next prev parent reply other threads:[~2006-12-07 10:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-06 3:43 Quôc Peyrot
2006-12-06 8:55 ` [Caml-list] " Daniel Bünzli
2006-12-06 9:01 ` Daniel Bünzli
2006-12-07 10:43 ` Quôc Peyrot [this message]
2006-12-07 12:14 ` Jon Harrop
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=8E63D477-08E0-485C-A250-6E90A699A253@lrde.epita.fr \
--to=chojin@lrde.epita.fr \
--cc=caml-list@inria.fr \
/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;
as well as URLs for NNTP newsgroup(s).