Version française
Home     About     Download     Resources     Contact us    
Browse thread
How to write efficient threaded programs on OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christophe TROESTLER <Christophe.Troestler@u...>
Subject: Re: [Caml-list] How to write efficient threaded programs on OCaml
On Wed, 08 Feb 2006, Xavier Leroy <Xavier.Leroy@inria.fr> wrote:
> 
> Could you please tell us where to find the OCaml code you're
> discussing?  I haven't seen it anywhere on the Web page you posted.

Sorry.  You get the code by clicking on the language name:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=chameneos&lang=all
The task description is at the bottom of the page.

The one similar to MLton is:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=chameneos&lang=ocaml&id=0

The one similar to C code:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=chameneos&lang=ocaml&id=3

> You're really testing threading libraries, not language implementations.

Point taken.  After a more careful investigation, MLton does not use
OS threads so it is not really a valid comparison.  The GCC one (which
uses pthreads and semaphores) still seems to hold -- maybe I
overlooked something.

> My feelings at this point (without having seen the code nor the task
> spec) is that you don't want to use threads at all, rather something
> like CPS.

Possibly.  I will investigate what I can do in that direction
(pointers are welcome :).

Thanks,
ChriS