From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id pBAFefUa019146 for ; Sat, 10 Dec 2011 16:40:41 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EACR9407DDgCO/2dsb2JhbABDqnuBBoFyAQEFOhwjEAsYLjkeBhOICga0T4ttBJRwimyHPQ X-IronPort-AV: E=Sophos;i="4.71,331,1320620400"; d="scan'208";a="122853979" Received: from 195-14-0-142.nuxit.net (HELO de558.ispfr.net) ([195.14.0.142]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 10 Dec 2011 16:40:36 +0100 Received: from ours.starynkevitch.net ([213.41.244.95] helo=glinka.lesours) by de558.ispfr.net with smtp (Exim 4.72) (envelope-from ) id 1RZP2Q-00023L-Hx; Sat, 10 Dec 2011 16:40:34 +0100 Date: Sat, 10 Dec 2011 16:40:20 +0100 From: Basile Starynkevitch To: Goswin von Brederlow Cc: oleg@okmij.org, caml-list@inria.fr, ontologiae@gmail.com Message-Id: <20111210164020.52c541c068ec0b3d041d088f@starynkevitch.net> In-Reply-To: <87aa712v26.fsf@frosties.localnet> References: <20111209065758.94306.qmail@eeoth.pair.com> <87aa712v26.fsf@frosties.localnet> X-Mailer: Sylpheed 3.2.0beta4 (GTK+ 2.24.8; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] Why NOT to compile OCaml via C On Sat, 10 Dec 2011 00:18:25 +0100 Goswin von Brederlow wrote: > > Well, write the code as ONE function and do use lables. Sure, the C > source will be huge for larger projects but then again you get the > single source optimization bonus from gcc. This won't work very well in practice, because practically speaking, a GCC recent (4.4, 4.5, or 4.6) compiler with -O1 optimization has a compile time which is quadratic with respect to the function size. Compiling a single 100 0000 C statements function with GCC take a lot of time & memory. (You might use http://starynkevitch.net/Basile/manydl.c to measure that) Cheers. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basilestarynkevitchnet mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mine, sont seulement les miennes} ***