caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Peter Hawkins <hawkinsp@cs.stanford.edu>
To: Basile Starynkevitch <basile@starynkevitch.net>
Cc: Goswin von Brederlow <goswin-v-b@web.de>,
	oleg@okmij.org, caml-list@inria.fr, ontologiae@gmail.com
Subject: Re: [Caml-list] Why NOT to compile OCaml via C
Date: Sat, 10 Dec 2011 15:56:39 -0800	[thread overview]
Message-ID: <CAHV0EmYw2Jy4DLH7zoxqPm4G+k8HzUDQ4SFWMHcij4TVZC8sWg@mail.gmail.com> (raw)
In-Reply-To: <20111210164020.52c541c068ec0b3d041d088f@starynkevitch.net>

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
<basile@starynkevitch.net> wrote:
> On Sat, 10 Dec 2011 00:18:25 +0100
> Goswin von Brederlow <goswin-v-b@web.de> 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: basile<at>starynkevitch<dot>net 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
>


  reply	other threads:[~2011-12-10 23:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-09  6:57 oleg
2011-12-09  7:52 ` Stéphane Glondu
2011-12-09  9:58   ` Gabriel Scherer
2011-12-09 10:06     ` [Caml-devel] " Jonathan Protzenko
2011-12-09 11:03     ` Mehdi Dogguy
2011-12-09 12:08     ` Benedikt Meurer
2011-12-09 12:37       ` Gabriel Scherer
2011-12-09 14:05         ` Benedikt Meurer
2011-12-09 14:30           ` Török Edwin
2011-12-09 14:51             ` Benedikt Meurer
2011-12-09 23:38             ` oliver
2011-12-09 21:22           ` Richard W.M. Jones
2011-12-10  9:36             ` Benedikt Meurer
2011-12-10 11:34   ` Jon Harrop
2011-12-09 23:01 ` oliver
2011-12-09 23:18 ` Goswin von Brederlow
2011-12-10  0:20   ` Till Varoquaux
2011-12-10  7:35   ` oleg
2011-12-10 15:40   ` Basile Starynkevitch
2011-12-10 23:56     ` Peter Hawkins [this message]
2011-12-11  8:24       ` Basile Starynkevitch

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=CAHV0EmYw2Jy4DLH7zoxqPm4G+k8HzUDQ4SFWMHcij4TVZC8sWg@mail.gmail.com \
    --to=hawkinsp@cs.stanford.edu \
    --cc=basile@starynkevitch.net \
    --cc=caml-list@inria.fr \
    --cc=goswin-v-b@web.de \
    --cc=oleg@okmij.org \
    --cc=ontologiae@gmail.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;
as well as URLs for NNTP newsgroup(s).