From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id DA862BBA7 for ; Wed, 8 Feb 2006 17:55:15 +0100 (CET) Received: from mx.laposte.net (mx.laposte.net [81.255.54.11]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k18GtFXF031249 for ; Wed, 8 Feb 2006 17:55:15 +0100 Received: from [192.168.0.37] (81.50.228.32) by mx.laposte.net (7.2.060.1) (authenticated as matthieu.dubuget) id 43839F3B028AD5A6 for caml-list@yquem.inria.fr; Wed, 8 Feb 2006 17:54:40 +0100 Message-ID: <43EA2329.5040107@laposte.net> Date: Wed, 08 Feb 2006 17:58:17 +0100 From: Matthieu Dubuget Reply-To: matthieu.dubuget@laposte.net User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: OCaml Mailing List Subject: Re: [Caml-list] How to write efficient threaded programs on OCaml References: <20060208.001547.81488614.Christophe.Troestler@umh.ac.be> <20060208192118.1755d70f.ocaml-erikd@mega-nerd.com> <20060208.153809.249505014.Christophe.Troestler@umh.ac.be> <43EA0B8D.6090906@inria.fr> In-Reply-To: <43EA0B8D.6090906@inria.fr> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Miltered: at nez-perce with ID 43EA2273.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; matthieu:01 dubuget:01 matthieu:01 dubuget:01 caml-list:01 ocaml:01 mlton:01 caml-list:01 ocaml:01 eabc:98 rewrite:01 slower:01 debian:02 debian:02 caml:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Xavier Leroy a écrit : >> My question is twofold. When using the Event module in the same way >> MLton does, the running time is ~30 times larger. I did this rewrite, mimicing MLton's version, and asked for improvements on this list some times ago: http://caml.inria.fr/pub/ml-archives/caml-list/2006/01/4eabc18ec6462a33b81c1b9969a6b18a.en.html The attached code seems not retrievable from Caml-list official archives. It's here: http://shootout.alioth.debian.org/debian/benchmark.php?test=chameneos&lang=ocaml&id=0 >> I'd like an >> explanation about why there is such a huge difference and possible >> ways to reduce it... Using an implementation close to C (Mutex, >> Condition) divides the time by 2 but still is about 6 times slower >> than C. Is it to say a better implementation is possible for OCaml ??? >> > > 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. > >