From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id 199FA7ED7A for ; Sun, 26 Aug 2012 21:37:37 +0200 (CEST) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.210.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail1-smtp-roc.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.210.182 as permitted sender) identity=mailfrom; client-ip=209.85.210.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-iy0-f182.google.com) identity=helo; client-ip=209.85.210.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-iy0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtEBAPN5OlDRVdK2mGdsb2JhbAArGrpjCCIBAQEBAQgJDQcUJ4IgAQEBAwESAiwBGx0BAwELBgULDS4iAREBBQEcBhMih1sBAwYGCyqcVwkDjCKCc4QwChknDQpNiHEBBQyKfIcRA5VVgRSNIz6EBQ X-IronPort-AV: E=Sophos;i="4.80,316,1344204000"; d="scan'208";a="170857910" Received: from mail-iy0-f182.google.com ([209.85.210.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 26 Aug 2012 21:37:36 +0200 Received: by ialo14 with SMTP id o14so11575378ial.27 for ; Sun, 26 Aug 2012 12:37:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=+mHGJyU970SLzFjLLrP6XoPrA/T7iuZU8p/r0TKOUgs=; b=Q3sstmeLH0nkhkgbgad3fR6jlcwcuNBpSG50iRn0KopPYhlfvufO+8FgFRoE1HmmjX iDrNcJ62k42aq13QxYcnFoRReoMNbEqcD8+qrnDhlZ/L7Q7MrJajBc1nt4sK2z3TYF3+ qXxdwtLhI7EjvClnDc00cCu0S/un30n4GGb0nZ/emg7NohS5iEfN53gc1Q7vDJodCLEr aN2GIbqgqjXQrBrCIFXxl59PXb3XhkllfwmSKduJTkTDP76xoNWwHSHp5WXm/mTsAWWr cHBYMX2VjgDK50q4LGdn1MfpXm7O9cxATDcwPRgHlF+CwPFvxZn1mQdvgKdqLxzMrdN8 IuyA== Received: by 10.50.57.138 with SMTP id i10mr6925658igq.1.1346009855170; Sun, 26 Aug 2012 12:37:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.32.39 with HTTP; Sun, 26 Aug 2012 12:36:55 -0700 (PDT) In-Reply-To: <20120826191020.GB1908@siouxsie> References: <503A30A7.3030707@gmail.com> <20120826191020.GB1908@siouxsie> From: Gabriel Scherer Date: Sun, 26 Aug 2012 21:36:55 +0200 Message-ID: To: oliver Cc: Hongbo Zhang , Caml List Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] How to profile compiler's performance > 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 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