From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=AWL,SPF_FAIL autolearn=disabled version=3.1.3 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 2510CBBC6 for ; Sat, 21 Mar 2009 22:30:44 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkUBAK/5xElQW+UCe2dsb2JhbACVbQEBFiIEvWqDfgY X-IronPort-AV: E=Sophos;i="4.38,401,1233529200"; d="scan'208";a="36950603" Received: from main.gmane.org (HELO ciao.gmane.org) ([80.91.229.2]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 21 Mar 2009 22:30:20 +0100 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Ll8lk-0007Wk-E0 for caml-list@inria.fr; Sat, 21 Mar 2009 21:30:16 +0000 Received: from elehack.net ([216.243.177.100]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 21 Mar 2009 21:30:16 +0000 Received: from michael by elehack.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 21 Mar 2009 21:30:16 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Michael Ekstrand Subject: Re: Google summer of Code proposal Date: Sat, 21 Mar 2009 16:28:52 -0500 Message-ID: <871vsqtvjf.fsf@jehiel.elehack.net> References: <200903211439.47107.cdome@bk.ru> <200903211338.32805.jon@ffconsultancy.com> <61A6655E-FD4E-45F8-AD7E-6050C2E0DDE5@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: elehack.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) Cancel-Lock: sha1:FQ3orW7AB6rBdybrPsbQAXXOJgA= Sender: news X-Spam: no; 0.00; run-time:01 compiler:01 lacks:01 compilation:01 ocaml:01 ocaml:01 compiler:01 gpg:01 ecosystem:98 wrote:01 compilers:01 tuples:01 writes:01 arbitrary:02 inefficient:02 X-Attachments: type="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable Joel Reymont writes: > On Mar 21, 2009, at 1:38 PM, Jon Harrop wrote: > >> . You will succumb to ocamlopt's current run-time representation >> which is >> objectively inefficient (e.g. boxing floats, tuples, records) and >> was only >> chosen because the compiler lacks capabilities that LLVM already >> provides for >> you (primarily JIT compilation). > > This is probably a stupid suggestion but why not have OCaml directly > generate machine code, without the use of assembler and linker? Because that would duplicate the code and logic provided by the system's assembler and linker (esp. linker). For every platform (and there are many possible combinations!). If you use the existing linker, then you can depend on the expertise of the authors for each system getting all the logic right for loading libraries (which may be arbitrary libraries, when you're using C extensions) and producing a binary in the correct format for that system. Something like LLVM means that OCaml doesn't even need to duplicate the knowledge about how to generate code for each architecture -- the compiler author can focus on writing a really good front end, and the LLVM people can focus on making an excellent machine code generator. If compilers can attract the best front-end authors, and projects like LLVM attract people with the best grasp of optimization and other back-end matters, then the entire compiler ecosystem benefits more than if these experts are split amongst many compiler projects. =2D Michael =2D-=20 mouse, n: A device for pointing at the xterm in which you want to type. Confused by the strange files? I cryptographically sign my messages. For more information see . --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAknFXBUACgkQJMBfXHjb5YUh5QCfWPGu1kIb++NwyX9KY/v35oHh g0EAn0oiFTO0bPZ7HVFteo14jFkw8kp5 =XrDE -----END PGP SIGNATURE----- --=-=-=--