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 UAA28568; Thu, 13 Nov 2003 20:58:27 +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 UAA27965 for ; Thu, 13 Nov 2003 20:58:26 +0100 (MET) Received: from cmailm3.svr.pol.co.uk (cmailm3.svr.pol.co.uk [195.92.193.19]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hADJwP126401 for ; Thu, 13 Nov 2003 20:58:25 +0100 (MET) Received: from modem-238.beedrill.dialup.pol.co.uk ([217.135.32.238]) by cmailm3.svr.pol.co.uk with esmtp (Exim 4.14) id 1AKNbk-0004Qx-Pm for caml-list@inria.fr; Thu, 13 Nov 2003 19:58:25 +0000 Date: Thu, 13 Nov 2003 19:58:22 +0000 (GMT) From: John J Lee X-X-Sender: john@alice To: caml-list@inria.fr Subject: Re: [Caml-list] Executable size? In-Reply-To: <3FB3A6A6.8010108@atcorp.com> Message-ID: References: <3FB2B050.8050901@atcorp.com> <3FB3A6A6.8010108@atcorp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 runtime:01 runtime:01 gcc:01 libgcc:01 statically:01 o'caml's:01 c's:01 libc:01 linked:01 ocaml:01 ocaml:01 garbage:01 garbage:01 nov:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, 13 Nov 2003, Eric Dahlman wrote: [...] > My point was that if you are making these sorts of comparisons you > cannot just *ignore* the runtime in the C/C++ case and more importantly > that C and O'Caml are not fundamentally different in this regard. By > definition it is impossible to write a program in C or C++ which does > not use the respective runtime, it cannot be ignored. Hmm, you're right. I had confused myself, I guess, by absorbing the widespread use of "C runtime" to mean MSVCRT.DLL (or libc.so, or whatever). [...] > the setting up the initial environment. In the case of gcc this is > captured in three files which a linked with each C program. They are > > crtbegin.o 1.6k > crtend.o 1.2k > libgcc.a 46.3k > > So it would be reasonable to say that the C runtime is 49k. > > Now in the case of O'Caml I don't know what the exact numbers are but > the ZINC interpreter is on the order of 75k and that includes the ocaml > runtime. So they are really similar, really the only big difference in > runtime requirements for OCaml is the garbage collector. [...] OK. Getting back to the original question again (how to reduce data to be transferred over the network), both O'Caml and C statically link this runtime stuff, right? So, why is O'Caml's "hello world" (compressed) 45k, to C's 1 or 2k? Is that 43k the garbage collector? Or is it mostly that O'Caml, in contrast to C, is linking in a bunch of stuff from its standard library that isn't strictly required for "hello world"? Or something else again?? Hope I'm not going round in circles here... John ------------------- 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