Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Eric Dahlman <edahlman@atcorp.com>
To: John J Lee <jjl@pobox.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Executable size?
Date: Thu, 13 Nov 2003 09:43:34 -0600	[thread overview]
Message-ID: <3FB3A6A6.8010108@atcorp.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0311122317440.3046@alice>

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


  parent reply	other threads:[~2003-11-13 15:44 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-12 16:14 John J Lee
2003-11-12 17:33 ` Richard Jones
2003-11-12 18:06   ` Dustin Sallings
2003-11-12 18:31     ` Sven Luther
2003-11-12 18:50       ` John J Lee
2003-11-13  9:10         ` Sven Luther
2003-11-13 13:46           ` John J Lee
2003-11-13 14:28             ` Sven Luther
2003-11-12 18:21   ` John J Lee
2003-11-12 22:53     ` Richard Jones
2003-11-12 23:50       ` John J Lee
2003-11-15 12:48     ` skaller
2003-11-15 15:25       ` John J Lee
2003-11-12 19:06   ` Brian Hurt
2003-11-12 18:38     ` Sven Luther
2003-11-12 19:04       ` Karl Zilles
2003-11-12 21:29         ` Brian Hurt
2003-11-12 20:03       ` Brian Hurt
2003-11-13  4:14         ` Kamil Shakirov
2003-11-13  9:06           ` Richard Jones
2003-11-13  9:18         ` Sven Luther
2003-11-12 18:46     ` John J Lee
2003-11-12 20:40       ` Brian Hurt
2003-11-12 20:10         ` Basile Starynkevitch
2003-11-12 20:35         ` John J Lee
2003-11-12 21:51           ` Brian Hurt
2003-11-12 21:35             ` David Brown
2003-11-12 22:12           ` Eric Dahlman
2003-11-12 23:32             ` Brian Hurt
2003-11-12 22:53               ` Eric Dahlman
2003-11-12 23:35               ` John J Lee
2003-11-12 23:44             ` John J Lee
2003-11-13  0:26               ` Karl Zilles
2003-11-13  1:29                 ` [Caml-list] F-sharp (was: Executable size?) Oleg Trott
2003-11-14  6:04                   ` [Caml-list] float_of_num Christophe Raffalli
2003-11-13 15:43               ` Eric Dahlman [this message]
2003-11-13 19:58                 ` [Caml-list] Executable size? John J Lee
2003-11-13 20:36                   ` Eric Dahlman
2003-11-13 22:16                     ` John J Lee
2003-11-15 13:41                   ` skaller
2003-11-15 15:13                     ` John J Lee
2003-11-15 18:07                       ` skaller
2003-11-15 13:36                 ` skaller
2003-11-15 15:01                   ` John J Lee
2003-11-15 17:53                     ` skaller
2003-11-13 13:37         ` Florian Hars
2003-11-12 18:05 ` Dustin Sallings
2003-11-12 18:36   ` John J Lee
2003-11-12 19:04     ` Dustin Sallings
2003-11-12 20:17       ` John J Lee
2003-11-12 20:01     ` Vitaly Lugovsky
2003-11-13  1:23 ` Nicolas Cannasse
2003-11-15 12:09 ` skaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3FB3A6A6.8010108@atcorp.com \
    --to=edahlman@atcorp.com \
    --cc=caml-list@inria.fr \
    --cc=jjl@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox