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 pBANukxO031458 for ; Sun, 11 Dec 2011 00:56:46 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkACAPbw407RVdK2kWdsb2JhbABDmlAHkCAIIgEBAQEJCQ0HEieBcgEBAQEDEgIsAS0LAQMMAQUFCw0NISISAQUBChIGExIQh26YIgqOT4QZMIh+AgUMg2yHdQSIMYxAimuDBj2BTYJN X-IronPort-AV: E=Sophos;i="4.71,332,1320620400"; d="scan'208";a="122874548" Received: from mail-iy0-f182.google.com ([209.85.210.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 11 Dec 2011 00:56:41 +0100 Received: by iakl21 with SMTP id l21so805719iak.27 for ; Sat, 10 Dec 2011 15:56:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=8EPthOqVYhG3Y3m/qPlMlhVx+rYS2HjP7hg+WWPv7Tk=; b=iCeb6QF8pw9Fn6W5mSDeMKRGETLwLRUlUHJ7XGuxMO1ls/JS4UfT49JCUiP/UBmPAt FvcN4Jta3L3zEApJab/nMMJ5S3zAt3jYHtRKtS4Z400xNWfkvShFp7SSsusdJPr1zZ9U TzvQsncROueR9SX80mb5L7zMcKbXjAZwoPcD8= MIME-Version: 1.0 Received: by 10.182.40.69 with SMTP id v5mr1698813obk.30.1323561399650; Sat, 10 Dec 2011 15:56:39 -0800 (PST) Sender: peter.hawkins@gmail.com Received: by 10.182.124.98 with HTTP; Sat, 10 Dec 2011 15:56:39 -0800 (PST) In-Reply-To: <20111210164020.52c541c068ec0b3d041d088f@starynkevitch.net> References: <20111209065758.94306.qmail@eeoth.pair.com> <87aa712v26.fsf@frosties.localnet> <20111210164020.52c541c068ec0b3d041d088f@starynkevitch.net> Date: Sat, 10 Dec 2011 15:56:39 -0800 X-Google-Sender-Auth: YhPMKMHyYBEskD1pbmsMNGRsju4 Message-ID: From: Peter Hawkins To: Basile Starynkevitch Cc: Goswin von Brederlow , oleg@okmij.org, caml-list@inria.fr, ontologiae@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id pBANukxO031458 Subject: Re: [Caml-list] Why NOT to compile OCaml via C Hi... There are some cool but quite dirty tricks based on computed gotos between functions to avoid problems with function size; see Section 5.2 of: Compiling logic programs to C using GNU C as a portable assembler Fergus Henderson, Zoltan Somogyi and Thomas Conway. Proceedings of the ILPS '95 Postconference Workshop on Sequential Implementation Technologies for Logic Programming Languages. Portland, Oregon, December 1995. Cheers, Peter On Sat, Dec 10, 2011 at 7:40 AM, Basile Starynkevitch wrote: > 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} *** > > -- > Caml-list mailing list.  Subscription management and archives: > https://sympa-roc.inria.fr/wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >