On 04/07/2004, at 7:49 PM, Erik de Castro Lopo wrote:

On Sun, 4 Jul 2004 19:45:31 +1000
André Pang <[EMAIL PROTECTED]> wrote:

O'Caml actually does both.  You can compile to a portable bytecode
format if you want to (like Java/Perl/Python) with ocamlc, or you can
compile to native code with ocamlopt (but only on platforms where
ocamlopt is available: I think x86, PPC, and Alpha).

So which one is it that was winning the (so called) language speed shootouts?

According to <http://shootout.alioth.debian.org/craps.php>, O'Caml optimised to native code placed 4th (score of 40.9063, implementation name is "ocaml"), and O'Caml compiled to bytecode placed 16th (score of 16.2858, implementation name is "ocamlb"). Note that that's a pure speed comparison: no memory usage or lines of code factored in.


One interesting thing I didn't expect is that Clean, a very close relative of Haskell which implements the linear types thing I touched on briefly in my talk, is quite fast (placed 5th, just after O'Caml): I guess it goes to show that even a purely functional language (which O'Caml isn't) can be pretty damn quick. I'm fairly convinced that linear types alone account for a huge part of that speed increase vs Haskell's performance given in the ghc benchmarks; it really makes me wish linear types were implemented in a Haskell compiler. There's also been quite a few posts to the Clean mailing lists in the past week which point to some patches to Clean that gives greatly improved performance in some tests; e.g. they claim a 8x speed-up on the Reverse File test after enabling that "buffering" thing on stdio :-).

For what it's worth, I think that language shootouts are a load of crap: see <http://xrl.us/cada> on a post I made about why.


-- % Andre Pang : trust.in.love.to.save

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to