From: "Nicolas Cannasse" <warplayer@free.fr>
To: "John J Lee" <jjl@pobox.com>, <caml-list@inria.fr>
Subject: Re: [Caml-list] Executable size?
Date: Thu, 13 Nov 2003 10:23:48 +0900 [thread overview]
Message-ID: <00b001c3a984$ccf56f80$0274a8c0@PWARP> (raw)
In-Reply-To: <Pine.LNX.4.58.0311121605570.1430@alice>
> How does O'Caml compare with languages like Haskell (ghc), C and C++ for
> executable size? Does compiled code depend on a runtime library (and how
> big is that, if so)?
>
> Are there any easily-identifiable, non-obvious, factors that affect
> executable size (I'm talking about end-use factors, rather those resulting
> from the design decisions taken by the language designers and
> implementors)?
>
> I currently use Python by preference, but I'm interested in a language
> (other than C/C++!) that doesn't depend on a big runtime library and
> generates "reasonably" small executables -- modems are here to stay for a
> while yet.
If you need COM support , look at OCaml'OLE :
http://tech.motion-twin.com/ocamole
If you need to make Windows DLL , look at ODLL :
http://tech.motion-twin.com/odll
If you need access to the win32 API, look at the ocaml port here :
http://www.speakeasy.org/~hchomsky/ocaml-win32.html
About the size of the executables (in native mode) :
The main problem for a Window developper is that usually when you link a
library staticly, the inclusion is made on a function basis, and not on a
module basis as ocaml do. Then if you have big Ocaml libraries, you should
split them into several indepent modules if feasible to avoid linking all.
I also found recently (is it a 3.07 "feature" - i didn't compare with 3.06
?) that classes compiled natively are taking an huge amount of space : a
~2000 lines library defining ~25 classes with actually not so much code is
compiling into a 100 Ko library in bytecode and into 440 Ko in native...
Using dynamic linking of C stubs will help here , but there is actually no
way of dynlinking Ocaml librairies ( the Dynlink module is not actually
doing any linking.... only loading ).
>From my own experience, executables size are growing faster in OCaml than in
C/C++, with a big leap every time you're linking with an additional
library.... but their size worth it !
Nicolas Cannasse
-------------------
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
next prev parent reply other threads:[~2003-11-13 1:24 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 ` [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 [this message]
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='00b001c3a984$ccf56f80$0274a8c0@PWARP' \
--to=warplayer@free.fr \
--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