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
about OcamIL
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-05-19 (13:27)
From: Eray Ozkural <examachine@g...>
Subject: Re: [Caml-list] Re: about OcamIL
On Wed, May 19, 2010 at 2:29 PM, Michael Ekstrand <> wrote:
> Yes, Python's hash tables are particularly optimized due to their wide
> pervasive usage.  When you're testing Python hash tables, you're really
> testing a carefully-written, thoroughly-tuned C implementation of hash
> tables.

The most amusing benchmarks are those with Java bytecode working on
integer/float arrays. That is one place where Java has some admissible
performance (comparable to ocaml bytecode?), but when you go to an
algorithm that is more expensive than O(n) in time and makes more than
O(n) dynamic memory allocations you will see how miserably Java fails.
I unfortunately haven''t prepared any benchmarks for those, the
info-retrieval, data mining and 3d-engine codes I had written in Java,
well it would have been 10x-20x better if I had written them in C++
and a benchmark would be possible, but if anyone is interested I can
surely post one of those codes, a clustering algorithm for Weka for
instance. I suspect that the performance hit is a "feature" of JVM
design, in addition to the Java language design.

On the other hand, Jon's notion of high performance is valid I think.
You want to be as close to the metal as possible. Otherwise there is
no point in, say, writing a parallel version of the code. In the past
we thought that was only possible with C and Fortran. Nowadays we
think of C++ when we say that but I gladly find that ocaml is on par
with any of those for real world tasks, without requiring tedious and
cumbersome optimizations just to get it running (like in Java).

That being said, I think getting anything to run on JVM is a
remarkable achievement! It would have been so cool to be able to run
ocaml code inside a web browser. :) There are unfortunately few
alternatives for running code inside a browser.


Eray Ozkural, PhD candidate.  Comp. Sci. Dept., Bilkent University, Ankara