Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2009-09-26 (16:44)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] OC4MC : OCaml for Multicore architectures
On Friday 25 September 2009 22:39:42 Jon Harrop wrote:
> On Friday 25 September 2009 05:07:21 Jacques Garrigue wrote:
> > Hashtables in Python are a basic feature of the language,
> > and they are of course implemented in C. In ocaml, they are
> > implemented in ocaml (except the hashing function, which has to be
> > polymorphic), using an array of association lists!
> > (Actually the pairs are flattened for better performance, but still)
> > What is impressive is that you don't need any special optimization to
> > get reasonably good performance.
> OCaml is 4x slower than F# on that benchmark...

That was mapping int -> int where OCaml has the unfair advantage of optimal 
initial size. If you map float -> float and give F# an initial size then it 
is over 18x faster than OCaml. The reason is, of course, OCaml's data 
representation strategy that is optimized for Xavier's Coq.

Dr Jon Harrop, Flying Frog Consultancy Ltd.