caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: oliver <oliver@first.in-berlin.de>
Cc: Hongbo Zhang <bobzhang1988@gmail.com>, Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] How to profile compiler's performance
Date: Sun, 26 Aug 2012 21:36:55 +0200	[thread overview]
Message-ID: <CAPFanBHHOjwgMADcrU+9T2GVhq_Hwc1V1owC-01-z3kq0ckYqQ@mail.gmail.com> (raw)
In-Reply-To: <20120826191020.GB1908@siouxsie>

> Is this documented somewhere?

Not to my knowledge -- but if people answer this thread we might be
able to gather enough data points.

Have a look at this previous discussion which may give a few ideas:
  http://old.nabble.com/Very-slow-compilation-td33479980.html#a33480123

I also remember a discussion where the problem was the number of
nested "for" loops : ocamlopt compilation time can be exponential in
this nesting number.

The bugtracker also has some example (some of which havebeen fixed
since reporting):
  http://caml.inria.fr/mantis/print_bug_page.php?bug_id=4905
  http://caml.inria.fr/mantis/print_bug_page.php?bug_id=2470

> I have an .ml file that takes more than 50 CPU seconds to compile on my
> 700 MHz computer with ocamlopt.opt version 3.07. The .ml file is
> 3253 lines long and machine-generated (more than 650 short functions
> that look similar).

Those were the times...

If Hongbo wished to share his source file, we may see where the time
is spent in his particular case.


On Sun, Aug 26, 2012 at 9:10 PM, oliver <oliver@first.in-berlin.de> wrote:
> On Sun, Aug 26, 2012 at 05:05:55PM +0200, Gabriel Scherer wrote:
> [...]
>> (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.)
> [...]
>
> Which are the sources of this behaviour?
>
> Is this documented somewhere?
>
>
> Ciao,
>    Oliver

  reply	other threads:[~2012-08-26 19:37 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
2012-08-26 19:10   ` oliver
2012-08-26 19:36     ` Gabriel Scherer [this message]
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=CAPFanBHHOjwgMADcrU+9T2GVhq_Hwc1V1owC-01-z3kq0ckYqQ@mail.gmail.com \
    --to=gabriel.scherer@gmail.com \
    --cc=bobzhang1988@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=oliver@first.in-berlin.de \
    /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).