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
RE: [Caml-list] comparison with C performance
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-05-02 (06:02)
From: Gregory Morrisett <jgm@C...>
Subject: RE: [Caml-list] comparison with C performance
>Mark Hayden basically proved that if you properly manage 
>memory and a few other things, well, you can be faster than C, 
>unless the C program is (ahem) trivial.

Erm, no.  The protocol optimizations used in Ensemble were
never translated back into C.  He compared against an older
version (Horus) which used different algorithms and 
acknowledged that if you translated the ideas from Ensemble
back into C, you'd probably get a performance win.  They
never bothered to do this because the Caml code had
acceptable performance.

The key thing is that it was too hard to do the restructuring
needed to experiment with new approaches to the group
communications protocol in C.  By coding in Caml, he
was able to make massive rearrangements until he got
the right algorithm.

So, the point is that (a) algorithms matter a lot more
than the delta between Caml vs. C, (b) it's easier to 
experiment with better algorithms in a higher-level language.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: