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=0.4 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 9DE46BBC4 for ; Mon, 2 Mar 2009 17:13:21 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjYCANSUq0nUnwckjmdsb2JhbACCKJJIAQEBAQkLCAkPBsE9hBoG X-IronPort-AV: E=Sophos;i="4.38,289,1233529200"; d="scan'208";a="21927762" Received: from relay.ptn-ipout02.plus.net ([212.159.7.36]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 02 Mar 2009 17:13:21 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At0EAJeUq0nUnw4U/2dsb2JhbACCKNQ+hBoG Received: from pih-relay08.plus.net ([212.159.14.20]) by relay.ptn-ipout02.plus.net with ESMTP; 02 Mar 2009 16:13:21 +0000 Received: from [87.112.14.152] (helo=leper.local) by pih-relay08.plus.net with esmtp (Exim) id 1LeAlc-0007Jy-Kz for caml-list@yquem.inria.fr; Mon, 02 Mar 2009 16:13:20 +0000 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Odd performance result with HLVM Date: Mon, 2 Mar 2009 16:18:39 +0000 User-Agent: KMail/1.9.9 References: <200902280112.24115.jon@ffconsultancy.com> <200902282152.18430.jon@ffconsultancy.com> <49ABED07.30800@imag.fr> In-Reply-To: <49ABED07.30800@imag.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200903021618.39808.jon@ffconsultancy.com> X-Plusnet-Relay: 1b700f178bc5e54a1ff02510269a7e80 X-Spam: no; 0.00; ocamlopt:01 compilation:01 run-time:01 compilation:01 polymorphism:01 ocaml:01 equivalently:01 bool:01 struct:01 2009:98 frog:98 polymorphic:01 polymorphic:01 wrote:01 caml-list:01 On Monday 02 March 2009 14:28:23 Florent Ouchet wrote: > Jon Harrop a =E9crit : > > There are really two major advantages over the current ocamlopt design > > and both stem from the use of JIT compilation: > > > > . Run-time types allow per-type functions like generic pretty printers > > and comparison. > > > > . Monomorphisation during JIT compilation completely removes the > > performance cost of polymorphism, e.g. floats, tuples and records are > > never boxed. > > Do you mean that each polymorphic function is compiled into a different > native piece of code each time it is called with different parameter > types? Yes. > How does the JIT'ed code size compare to ocamlopt'ed code size?=20 No idea. Without a front end I have only compiled the smallest pieces of te= st=20 code so far, just to make sure that the functionality works. =2ENET does the same thing and it offers substantial performance improvemen= ts=20 over OCaml for polymorphic code. Note that there is no reason to distinguish between reference types for the= y=20 can all be treated equivalently with respect to instantiating polymorphic=20 code. My type system is as follows: type t =3D [ `Unit | `Bool | `Int | `Float | `Struct of t list | `Array of t | `Function of t list * t | `Reference ] =2D-=20 Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e