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 QAA06516; Sun, 18 May 2003 16:38:52 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA07485 for ; Sun, 18 May 2003 16:38:50 +0200 (MET DST) Received: from opus.davidb.org (66-75-152-1.san.rr.com [66.75.152.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h4IEcnT17193 for ; Sun, 18 May 2003 16:38:50 +0200 (MET DST) Received: from davidb by opus.davidb.org with local (Exim 3.31 #1 (Debian)) id 19HPJI-0000Ae-00; Sun, 18 May 2003 07:38:48 -0700 Date: Sun, 18 May 2003 07:38:48 -0700 From: David Brown To: Chris Hecker Cc: David Brown , "'caml-list@inria.fr'" Subject: Re: [Caml-list] ocaml and large development projects Message-ID: <20030518143848.GA599@opus.davidb.org> References: <4.3.2.7.2.20030517192812.033d9040@localhost> <4.3.2.7.2.20030517192812.033d9040@localhost> <4.3.2.7.2.20030517225010.04b748a0@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4.3.2.7.2.20030517225010.04b748a0@localhost> User-Agent: Mutt/1.4i X-Spam: no; 0.00; caml-list:01 hecker:01 showstopper:01 inlining:01 checksums:01 ocamldep:01 dependencies:01 cross-module:01 recompiles:01 compiler:01 chris:01 compilers:01 ocaml:01 recompile:01 0700,:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, May 17, 2003 at 11:10:03PM -0700, Chris Hecker wrote: > Do people think I'm overreacting there? I can't believe anyone thinking > about using ocaml for big native code projects wouldn't consider this a > 100% showstopper. I certainly would have thought differently about using > ocaml if I'd known this when I started my project. > If this can't be fixed, there needs to be a way to disable cross-file > inlining so that it can be worked around (and the checksums should reflect > this, and ocamldep should do the right thing, etc.), and then when you want > to "globally optimize" you can recompile the world. 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. 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. However, ocaml is not alone in supporting cross-file inlining. The GNU-Ada compiler (GNAT) supports cross-module inlining. It is an option, that is not enabled by default. The compiler automatically detects the extra dependencies when it is enabled, and recompiles as necessary. 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. ------------------- 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