English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Odd performance result with HLVM
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-03-02 (16:13)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] Odd performance result with HLVM
On Monday 02 March 2009 14:28:23 Florent Ouchet wrote:
> Jon Harrop a écrit :
> > 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?


> How does the JIT'ed code size compare to ocamlopt'ed code size? 

No idea. Without a front end I have only compiled the smallest pieces of test 
code so far, just to make sure that the functionality works.

.NET does the same thing and it offers substantial performance improvements 
over OCaml for polymorphic code.

Note that there is no reason to distinguish between reference types for they 
can all be treated equivalently with respect to instantiating polymorphic 
code. My type system is as follows:

type t =
    [ `Unit
    | `Bool
    | `Int
    | `Float
    | `Struct of t list
    | `Array of t
    | `Function of t list * t
    | `Reference ]

Dr Jon Harrop, Flying Frog Consultancy Ltd.