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 FAA25403; Thu, 13 Nov 2003 05:10:33 +0100 (MET) 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 FAA24449 for ; Thu, 13 Nov 2003 05:10:31 +0100 (MET) Received: from tornado.force (cs1-ats25-dzer-222.dialup.mts-nn.ru [213.177.121.222]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hAD4AT109000 for ; Thu, 13 Nov 2003 05:10:29 +0100 (MET) Received: from tornado.force (tornado.force [127.0.0.1]) by tornado.force (8.12.8/8.12.8) with ESMTP id hAD4EIGu003174; Thu, 13 Nov 2003 07:14:19 +0300 Received: (from kamil@localhost) by tornado.force (8.12.8/8.12.8/Submit) id hAD4EF17003172; Thu, 13 Nov 2003 07:14:15 +0300 X-Authentication-Warning: tornado.force: kamil set sender to kamils@inbox.ru using -f X-Comment-To: Brian Hurt To: Brian Hurt Cc: Subject: Re: [Caml-list] Executable size? References: Organization: niimash From: Kamil Shakirov Date: Thu, 13 Nov 2003 07:14:15 +0300 In-Reply-To: (Brian Hurt's message of "Wed, 12 Nov 2003 14:03:35 -0600 (CST)") Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Reasonable Discussion, linux) 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 iostream:01 endl:01 endline:01 gcc:01 gcc:01 ocamlc:01 -version:01 3.07:01 -os:01 usr:01 libm:01 libm:01 libgcc:01 libgcc:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, --------- hello.cc --------------- #include 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