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 QAA18825; Thu, 13 Nov 2003 16:44:21 +0100 (MET) 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 QAA18130 for ; Thu, 13 Nov 2003 16:44:20 +0100 (MET) Received: from moby.atcorp.com (moby.atcorp.com [204.72.172.2]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hADFiI113997 for ; Thu, 13 Nov 2003 16:44:18 +0100 (MET) Received: from atcorp.com (seahorse.atcorp.com [204.72.172.13]) by moby.atcorp.com (8.11.6/8.11.2) with ESMTP id hADFkiZ14045; Thu, 13 Nov 2003 09:46:45 -0600 Message-ID: <3FB3A6A6.8010108@atcorp.com> Date: Thu, 13 Nov 2003 09:43:34 -0600 From: Eric Dahlman User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 To: John J Lee CC: caml-list@inria.fr Subject: Re: [Caml-list] Executable size? References: <3FB2B050.8050901@atcorp.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 runtime:01 runtime:01 natively:01 gcc:01 libgcc:01 imprecise:01 ocaml's:01 misleading:01 linked:01 implements:01 ocaml:01 ocaml:01 garbage:01 lisp:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk John J Lee wrote: [snip...] > I don't understand what this has to do with what I said in the quote. > Yes, C runtime is present on essentially all systems, but the point is > that C and O'Caml are fundamentally different: with C, you can *ignore* > that runtime, and write a program that simply doesn't use it at all. Not > so with O'Caml (for perfectly good and sensible reasons). 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. The runtime for any language implements the irreducible primitives of that language implementation and is usually quite small. In the case of C this includes implementations of primitive data types and operators not natively supported on a given architecture as well as support for 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. Now we have been talking much larger numbers in this thread and that is because people have been using some imprecise definitions for runtime. These bigger numbers have been including the notion of a standard library into the runtime. In that case C looks smaller because its "standard runtime library" is already present on the system awhile OCaml's is not. >>One way to even things up is require the C version to link to all of its > > [...] > > Also, I'm simply looking for a way to distribute code, not trying to start > a pissing contest between C and O'Caml :-) so I'm not interested in > "evening things up". Nor am I (but I bet my language can hit that fly up on the wall...) The problem is that the measures being discussed were incorrect and misleading, I was trying to point out that fact. When honestly looking at things from the standpoint of the runtime C is the smallest OCaml a close second and C++ is huge (libsupc++.a is 162k, which I think is the one we want). This is an exact parallel to the old argument that Common Lisp runtime is HUGE while Scheme is small. When you separate out the runtime from the library they are really about the same but that does not make for good flame wars. Language implementation and runtime size is really an interesting topic but it is not a practical metric for measuring a language. Furthermore, going back to the beginning of this thread it actually doesn't relate to your original problems with download size - those are really problems of politics, economics and a little engineering. -Eric ------------------- 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