caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: Hongbo Zhang <bobzhang1988@gmail.com>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] How to profile compiler's performance
Date: Sun, 26 Aug 2012 17:05:55 +0200	[thread overview]
Message-ID: <CAPFanBFtypXBgv-vOZjPfk0hKeXnLJddkw0aKRNX6YV_3Uu2nA@mail.gmail.com> (raw)
In-Reply-To: <503A30A7.3030707@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]

You could try compiling a native OCaml compiler executable with profiling
option (-p) (setting that up might be a pain, though).

Before that you could try to only typecheck the file (option "-i") to know
whether it's the type-checking or code generation that is problematic. (-i
causes type printing as well, so for very large types that are internally
shared it can be its own source of slowness)

If it was in code generation, that would most likely only occur during when
compiling to native code. Have you noticed the performance bottleneck with
compilation to bytecode as well?

(Of course using the natively-compiled versions of your compilers will also
speed up performance, but if your generated code hits one of the source of
exponential behavior of the compiler you're out of luck anyway.)

On Sun, Aug 26, 2012 at 4:20 PM, Hongbo Zhang <bobzhang1988@gmail.com>wrote:

> Hi List,
>    I have a file which is only 410 lines, the compilation process takes
> nearly 1 minutes. Before my refactoring, it's compiled very fast.
>    Is there a way to know which part the compiler spend most time in ?
>    Many Thanks
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa-roc.inria.fr/**wws/info/caml-list<https://sympa-roc.inria.fr/wws/info/caml-list>
> Beginner's list: http://groups.yahoo.com/group/**ocaml_beginners<http://groups.yahoo.com/group/ocaml_beginners>
> Bug reports: http://caml.inria.fr/bin/caml-**bugs<http://caml.inria.fr/bin/caml-bugs>
>
>

[-- Attachment #2: Type: text/html, Size: 1995 bytes --]

  reply	other threads:[~2012-08-26 15:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-26 14:20 Hongbo Zhang
2012-08-26 15:05 ` Gabriel Scherer [this message]
2012-08-26 19:10   ` oliver
2012-08-26 19:36     ` Gabriel Scherer
2012-08-26 19:59     ` Daniel Bünzli
2012-08-26 20:52       ` oliver
2012-08-27  0:14         ` oliver
2012-08-27 15:33           ` Markus Weißmann
2012-08-26 20:25   ` Hongbo Zhang
2012-08-26 20:05 ` Fabrice Le Fessant
2012-08-26 20:54   ` oliver
2012-08-27  8:00     ` Benedikt Meurer

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=CAPFanBFtypXBgv-vOZjPfk0hKeXnLJddkw0aKRNX6YV_3Uu2nA@mail.gmail.com \
    --to=gabriel.scherer@gmail.com \
    --cc=bobzhang1988@gmail.com \
    --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).