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 TAA00400; Wed, 12 Nov 2003 19:05:21 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA00192 for ; Wed, 12 Nov 2003 19:05:19 +0100 (MET) Received: from bob.west.spy.net (mail.west.spy.net [66.149.231.226]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hACI5I128469 for ; Wed, 12 Nov 2003 19:05:18 +0100 (MET) Received: from [10.9.254.240] (sjc-dist3-e3.2wire.com [63.203.253.2]) by bob.west.spy.net (Postfix) with ESMTP id 96B5D65F6; Wed, 12 Nov 2003 10:05:14 -0800 (PST) In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v606) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit Cc: caml-list@inria.fr From: Dustin Sallings Subject: Re: [Caml-list] Executable size? Date: Wed, 12 Nov 2003 10:05:13 -0800 To: John J Lee X-Mailer: Apple Mail (2.606) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 haskell:01 runtime:01 runtime:01 non-obvious:01 python:01 python:01 ocaml's:01 bin:01 apps:01 apps:01 implementors:01 ocaml:01 bytecode:01 executables:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Nov 12, 2003, at 8:14, John J Lee wrote: > 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)? Well, the bin is bigger than a minimal C app with the same functionality. There is no runtime library required (I build and distribute apps). I somehow don't have ghc on my machines here to do a comparison. > 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)? (don't know) > 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. The stuff I build on my Mac ends up being about 300k so far. That seems reasonably small to me. I'm not sure what a modem has to do with your distribution, but there are options. You could distribute the source to your app (which will be way smaller than the equivalent C or C++ application) and compile elsewhere, or you can use the transfer time to bask in your productivity and performance gains. :) Python is a bad reference for two reasons: 1) You don't typically distribute compiled python apps (and when you do, it's always bytecode). 2) Ocaml's runtime is *amazingly* fast. I've prototyped a few apps in python before rewriting in ocaml for performance. The speed gains alone are beginning to push python away from being my primary utility app language. I like a lot about the language as well. -- Dustin Sallings ------------------- 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