caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Kamil Shakirov <kamils@inbox.ru>
To: Brian Hurt <bhurt@spnz.org>
Cc: <caml-list@inria.fr>
Subject: Re: [Caml-list] Executable size?
Date: Thu, 13 Nov 2003 07:14:15 +0300	[thread overview]
Message-ID: <m2oevgc3c8.fsf@tornado.force> (raw)
In-Reply-To: <Pine.LNX.4.44.0311121346590.5009-100000@localhost.localdomain> (Brian Hurt's message of "Wed, 12 Nov 2003 14:03:35 -0600 (CST)")

Hello,

--------- hello.cc ---------------
#include <iostream>

using namespace std;

int main ()
{
	cout << "Hello, world!" << endl;
	return 0;
}
--------- hello.ml ---------------
let _ = print_endline "Hello, world!";;

kamil$ uname -a
Linux tornado.force 2.4.22 #1 Fri Oct 24 12:29:16 MSD 2003 i586 i586 i386 GNU/Linux

kamil$ gcc --version
gcc (GCC) 3.3.2
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

kamil$ ocamlc -version 
3.07[+Shared]

kamil$ g++ -Os -o hello_cpp hello.cc && strip hello_cpp && ldd hello_cpp
        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4001d000)
        libm.so.6 => /lib/libm.so.6 (0x400d1000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x400f2000)
        libc.so.6 => /lib/libc.so.6 (0x400fa000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

kamil$ ocamlopt -compact -o hello_mln hello.ml && strip hello_mln && ldd ./hello_mln
        libm.so.6 => /lib/libm.so.6 (0x4001c000)
        libdl.so.2 => /lib/libdl.so.2 (0x4003e000)
        libc.so.6 => /lib/libc.so.6 (0x40041000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

kamil$ g++ -Os -static -o hello_cpp_stat hello.cc && strip hello_cpp_stat

kamil$ ocamlopt -compact -ccopt -static -o hello_mln_stat hello.ml \
       && strip hello_mln_stat

kamil$ ls -l hello_*
-rwxr-xr-x    1 kamil    homeusers     3988 Nov 13 07:00 hello_cpp
-rwxr-xr-x    1 kamil    homeusers   787660 Nov 13 07:00 hello_cpp_stat
-rwxr-xr-x    1 kamil    homeusers    72044 Nov 13 07:00 hello_mln
-rwxr-xr-x    1 kamil    homeusers   458236 Nov 13 07:02 hello_mln_stat

It is more fair in relation to the OCaml. ;)

-- 
 Kamil.

-------------------
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


  reply	other threads:[~2003-11-13  4:10 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 [this message]
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               ` [Caml-list] Executable size? Eric Dahlman
2003-11-13 19:58                 ` 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=m2oevgc3c8.fsf@tornado.force \
    --to=kamils@inbox.ru \
    --cc=bhurt@spnz.org \
    --cc=caml-list@inria.fr \
    /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;
as well as URLs for NNTP newsgroup(s).