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
Comparison of OCaml and MLton for numerics
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-06-01 (16:52)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] Comparison of OCaml and MLton for numerics

You guys seem to have left me in the dust in this discussion. :-)

On Friday 01 June 2007 17:14:36 Markus Mottl wrote:
> Absolutely!  E.g. we had to specialize hash tables for integer and
> string keys

I wholeheartedly agree with this. OCaml is lightning fast for 1=2 but 
dreadfully slow for (1,2)=(2,3). I'm sure this can be addressed easily 

> I'd surely be happy to see the addition of some (optional)
> higher-level code transformations to OCaml.  Not just inlining, maybe
> some partial evaluation of the resulting code, which could also reduce
> code size if the compiler can prove that certain branches will not be
> taken.

General partial evaluation/specialization is another area that is too 
unpredictable to leave it entirely up to the compiler, IMHO. Like inlining, 
simple changes to existing programs have shown that "obvious" optimizations 
can slow things down a lot.

Dr Jon D Harrop, Flying Frog Consultancy Ltd.
OCaml for Scientists