Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Executable size?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Brian Hurt <bhurt@s...>
Subject: Re: [Caml-list] Executable size?
On Wed, 12 Nov 2003, Karl Zilles wrote:

> Don't forget to strip out debugging info.  When I did that on cygwin I 
> dropped from 165K to 100K.
> 
> 

Good point.  Continuing on my pedantic rant:
$ cat temp2.ml
let _ = Printf.printf "Hello, world!\n";;
                                                                                
$ ocamlopt -o temp2 temp2.ml
$ ls -l temp2
-rwxrwxr-x    1 bhurt    bhurt      150448 Nov 12 15:19 temp2
$ strip temp2
$ ls -l temp2
-rwxrwxr-x    1 bhurt    bhurt      101500 Nov 12 15:24 temp2
$ bzip2 -9v temp2
  temp2:    2.287:1,  3.498 bits/byte, 56.27% saved, 101500 in, 44387 out.
$ ls -l temp2.bz2
-rwxrwxr-x    1 bhurt    bhurt       44387 Nov 12 15:24 temp2.bz2
$ cat temp3.c
#include <stdio.h>
 
int main (void) {
    puts("Hello, world!");
    return 0;
}
 
$ gcc -Os -o temp3 temp3.c
$ ls -l temp3
-rwxrwxr-x    1 bhurt    bhurt       11228 Nov 12 15:27 temp3
$ strip temp3
$ ls -l temp3
-rwxrwxr-x    1 bhurt    bhurt        2768 Nov 12 15:27 temp3
$ bzip2 -9v temp3
  temp3:    2.009:1,  3.983 bits/byte, 50.22% saved, 2768 in, 1378 out.
$ ls -l temp3.bz2
-rwxrwxr-x    1 bhurt    bhurt        1378 Nov 12 15:27 temp3.bz2
$



-- 
"Usenet is like a herd of performing elephants with diarrhea -- massive,
difficult to redirect, awe-inspiring, entertaining, and a source of
mind-boggling amounts of excrement when you least expect it."
                                - Gene Spafford 
Brian


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