From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 0EC4FBC40 for ; Tue, 26 Oct 2004 22:07:26 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i9QK7PYq009137 for ; Tue, 26 Oct 2004 22:07:25 +0200 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 WAA18887 for ; Tue, 26 Oct 2004 22:07:25 +0200 (MET DST) Received: from ptb-relay01.plus.net (ptb-relay01.plus.net [212.159.14.212]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i9QK7Ned018989 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 26 Oct 2004 22:07:25 +0200 Received: from [80.229.56.224] (helo=chetara) by ptb-relay01.plus.net with esmtp (Exim) id 1CMXbD-0001Eq-3X for caml-list@inria.fr; Tue, 26 Oct 2004 20:07:19 +0000 From: Jon Harrop To: "caml users" Subject: Re: [Caml-list] Combined compilation and linking Date: Tue, 26 Oct 2004 21:02:39 +0100 User-Agent: KMail/1.6.2 References: <1098812039.2903.147.camel@pelican.wigram> In-Reply-To: <1098812039.2903.147.camel@pelican.wigram> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200410262102.39677.jon@jdh30.plus.com> X-Miltered: at nez-perce with ID 417EAE7D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 417EAE7B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 compilation:01 wrote:01 compilation:01 ocaml:01 productive:01 compilations:01 compiler:01 compilations:01 hash:01 cheers:01 compile:01 compile:01 languages:03 linking:03 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: On Tuesday 26 October 2004 18:34, skaller wrote: > Why do we need separate compilation > and linkage in the style of C on modern systems? In other languages you might want to do separate compilation in order to distribute object files instead of source. Seeing as this doesn't really work in OCaml, I can't see that another approach couldn't be equally productive. > Surely, we would like to have fast compilations, but > why can't the compiler treat that as an automatic > optimisation, rather than a user managed one? As a start, this could be performed by a combined compiler-linker which could, for example, cache compilations by file name (module name) and the hash and contents of the file for the "n" most recently compiled files. Then you just feed this program all your source files. More advanced versions could split source files up and compile each part separately, combining the result. A preliminary test of the potential productivity of this would be to measure the time taken to load vs the time taken to compile some example source files. Cheers, Jon.