Version française
Home     About     Download     Resources     Contact us    
Browse thread
OC4MC : OCaml for Multicore architectures
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] OC4MC : OCaml for Multicore architectures
On Saturday 26 September 2009 14:51:21 kcheung@math.carleton.ca wrote:
> > On Saturday 26 September 2009 01:45:50 kcheung@math.carleton.ca wrote:
> >> Perhaps an off-topic and naive question: What does it take to beat F#
> >> and
> >> still have predictable performance?
> >
> > Provided you're talking abouts today's machines and don't care about
> > pause times, HLVM with a parallel GC (not unlike the oc4mc one) and a
> > task library
> > would beat F# and still have predictable performance.
>
> If I understand correctly, HLVM is an
> analog of Microsoft's CLR.

HLVM certainly draws upon ideas from the CLR but it is different in many 
respects. One important advantage of HLVM over the CLR is that it handles 
structs correctly in the presence of tail calls (thanks to LLVM). This means 
that tuples can be represented (in the absence of polymorphic recursion) as 
unboxed C structs which *greatly* reduces the burden on the garbage 
collector. HLVM also uses a far superior code generator (LLVM) compared to 
the CLR and OCaml.

> So theoretically, 
> one can build a compiler for ocaml that
> compiles to HLVM.  Would that make ocaml
> beat F#?

That would beat the performance of F# with minimal effort. That was the goal 
of my HLVM hobby project but I was forced to shelve it when the recession 
hit. Hopefully I'll get back to it in 2010...

-- 
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e