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 RAA09775; Sat, 22 Feb 2003 17:00:05 +0100 (MET) 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 RAA09756 for ; Sat, 22 Feb 2003 17:00:04 +0100 (MET) Received: from mail2.tpgi.com.au (mail.tpgi.com.au [203.12.160.58]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h1MG02H03709 for ; Sat, 22 Feb 2003 17:00:03 +0100 (MET) Received: from ozemail.com.au (syd-ts21-2600-151.tpgi.com.au [203.219.16.151]) (authenticated (0 bits)) by mail2.tpgi.com.au (8.11.6/8.11.6) with ESMTP id h1MFqhv03592; Sun, 23 Feb 2003 02:52:44 +1100 Message-ID: <3E579CC3.2040208@ozemail.com.au> Date: Sun, 23 Feb 2003 02:52:35 +1100 From: John Max Skaller User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2.1) Gecko/20010901 X-Accept-Language: en-us MIME-Version: 1.0 To: Nicolas George CC: caml-list@inria.fr Subject: Re: [Caml-list] OCaml standard library improvement References: <200302211618.RAA10481@gnome.at.coli.uni-sb.de> <20030221172313.GA7908@clipper.ens.fr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Nicolas George wrote: > A string > library should be one module, we agree. Let's say it is "String". Then > as soon as you use one function of the String module, the resulting > binary will hold _all_ the code in the String module. If you have a lot > of functions in the module (and this is what we want), you have a huge > binary. Berk. > > As far as I know, there is no hack to avoid it. It would be necessary to > rethink the format of the .cmo or .cma files to allow that. Two viewpoints: (1) in the "old" days, one could extract only needed functions from libraries: this kept executables small. (2) in the modern system, the whole library is shared and linked dynamically, so the executable doesn't include the code at all. The actual overhead depends on how many processes share the code. So there are two ways forward: (1) split libraries into segments to ensure minimal static linkage (2) make ocaml emit code which can be linked into a shared library Whilst these tasks are not mutually exclusive, I'd see (1) as a nice optimisation, whilst (2) is a pre-requisite for industrial acceptance. -- John Max Skaller, mailto:skaller@ozemail.com.au snail:10/1 Toxteth Rd, Glebe, NSW 2037, Australia. voice:61-2-9660-0850 ------------------- 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