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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 943C27ED7A for ; Sun, 26 Aug 2012 22:05:22 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of fabrissimo@gmail.com) identity=pra; client-ip=74.125.83.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="fabrissimo@gmail.com"; x-sender="fabrissimo@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of fabrissimo@gmail.com designates 74.125.83.54 as permitted sender) identity=mailfrom; client-ip=74.125.83.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="fabrissimo@gmail.com"; x-sender="fabrissimo@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ee0-f54.google.com) identity=helo; client-ip=74.125.83.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="fabrissimo@gmail.com"; x-sender="postmaster@mail-ee0-f54.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjcDAAeBOlBKfVM2jWdsb2JhbABFhTy1JwgiAQEBAQkJFBIGI4IgAQEBBBICJAgBGx4DDAYFCw0JJQ8CEhEBBQEcEwgBAR6HWwEDDASdAAkDjCKCc4QxChknDVeIcQEFDIp8g3WDHAOVVYVciFs+hAU X-IronPort-AV: E=Sophos;i="4.80,316,1344204000"; d="scan'208";a="153859630" Received: from mail-ee0-f54.google.com ([74.125.83.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 26 Aug 2012 22:05:21 +0200 Received: by eeke52 with SMTP id e52so1582885eek.27 for ; Sun, 26 Aug 2012 13:05:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=yNX28pwNZS9Q5iXKW/bBmv7A9UzhRlkWETmZuL+ycjs=; b=eSVskz2wGMwuarkoPX/6911aewRa/SLYrU7vVbdbrVjdcBm68G2DAQIvtpTtlao27X a70iUnAlyj43ISlW0bZVicIS+GT+ApfwET0k/eZx8pHEhWzDzy2NCl/xwwjImco21bRv sfjcyi3H8/GK+YJ3VCNX4NS55viaCzJmIFuAbYptd0GU5Bb/rmlCXPqOypzdpDzotYRs wX6ZGGQs9fGudNgfHpvy/48m/xRg+Z84dCqcP4JRI86y3cLYMsFUH/B/pvL57uvGnI8F yr2ODSHmBQGDZ/z7GK77DLmojMVKDjWJe/oS46eu+90LmE0GXV6vUoBQGIm4PVgQQ9Pz sMTQ== Received: by 10.14.4.198 with SMTP id 46mr14982980eej.11.1346011521195; Sun, 26 Aug 2012 13:05:21 -0700 (PDT) Received: from [192.168.0.29] (gov91-4-83-152-214-51.fbx.proxad.net. [83.152.214.51]) by mx.google.com with ESMTPS id 9sm46442511eei.12.2012.08.26.13.05.19 (version=SSLv3 cipher=OTHER); Sun, 26 Aug 2012 13:05:20 -0700 (PDT) Message-ID: <503A817E.20109@gmail.com> Date: Sun, 26 Aug 2012 22:05:18 +0200 From: Fabrice Le Fessant User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: caml-list@inria.fr References: <503A30A7.3030707@gmail.com> In-Reply-To: <503A30A7.3030707@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Validation-by: fabrice.le_fessant@inria.fr Subject: Re: [Caml-list] How to profile compiler's performance Did you notice the same time behavior for both ocamlc.opt and ocamlopt.opt ? If yes, the problem comes during typing or pattern-matching compilation. If no, it comes from native code generation, probably register allocation (after inlining of small functions, some functions can become huge, with many variables interfering). Benedikt Meurer submitted a linear scan allocator at some point, you might want to try to compile your file with his compiler to see if it goes faster. --Fabrice On 08/26/2012 04:20 PM, Hongbo Zhang 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 >