From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA10220; Sun, 18 May 2003 18:00:15 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA10034 for ; Sun, 18 May 2003 18:00:13 +0200 (MET DST) Received: from mail.exomi.com (mail.exomi.com [217.169.64.72]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h4IG0CH01239 for ; Sun, 18 May 2003 18:00:12 +0200 (MET DST) Received: from exomi.com (unknown [10.0.5.5]) by mail.exomi.com (Postfix) with ESMTP id CA53A5DE2; Sun, 18 May 2003 19:00:10 +0300 (EEST) Date: Sun, 18 May 2003 19:00:09 +0300 Subject: Re: [Caml-list] ocaml and large development projects Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) Cc: Chris Hecker , "'caml-list@inria.fr'" To: David Brown From: Ville-Pertti Keinonen In-Reply-To: <20030518143848.GA599@opus.davidb.org> Message-Id: Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.552) X-Spam: no; 0.00; caml-list:01 inlining:01 dependencies:01 cmx:01 ocamldep:01 recompiles:01 compilers:01 ocaml:01 recompile:01 makefile:02 compile:02 optimized:02 modules:02 benchmarks:03 compilation:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > I do agree that there should be an option to disable cross-file > inlining. Somehow that would have to be coordinated with the > dependencies. I don't know if this would be easy to implement, though, > since I don't think the code doing the inlining knows where the > functions came from. Preventing dependencies between compilation units would also require preventing constant values from being picked up. > In my experience, it isn't as bad as you make it sound like. Touching > early modules doesn't cause a recompile of everything, only modules > that > directly depend on it. The inlining seems to only happen to one level. Are you sure? You could probably get make to do that by depending on .ml files instead of .cmx files, but that isn't what ocamldep generates. > There are a few C compilers that support cross-file inlining, but the > ones that I know of do it at "link" time. So instead of extra > recompiles of source files, you end up with extremely long link times, > since it is doing the global analysis of everything each time you link. Some C compilers support inlining across compilation units when you compile multiple files at a time, i.e. cc *.c can produce better optimized code than the equivalent compiled using a reasonable Makefile. I doubt that many people make use of such features in C compilers other than for benchmarks. Not because it isn't a useful optimization in general, but because C/C++ programming practices work around it by putting more things in header files. ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners