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 BD41BBBBB for ; Wed, 8 Feb 2006 23:13:44 +0100 (CET) Received: from hedwig1.umh.ac.be (hedwig2.umh.ac.be [193.190.193.73]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k18MDhs8029858 for ; Wed, 8 Feb 2006 23:13:44 +0100 Received: from poincare (Debian-exim@pri-012.umh.ac.be [10.101.0.12]) by hedwig1.umh.ac.be (8.13.1/8.13.1) with ESMTP id k18MGc6a1945778; Wed, 8 Feb 2006 23:16:41 +0100 Received: from localhost ([127.0.0.1] ident=trch) by poincare with esmtp (Exim 4.60) (envelope-from ) id 1F6xZA-0004E6-6n; Wed, 08 Feb 2006 23:13:36 +0100 Date: Wed, 08 Feb 2006 23:13:35 +0100 (CET) Message-Id: <20060208.231335.161803011.Christophe.Troestler@umh.ac.be> To: Xavier.Leroy@inria.fr Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] How to write efficient threaded programs on OCaml From: Christophe TROESTLER In-Reply-To: <43EA0B8D.6090906@inria.fr> References: <20060208192118.1755d70f.ocaml-erikd@mega-nerd.com> <20060208.153809.249505014.Christophe.Troestler@umh.ac.be> <43EA0B8D.6090906@inria.fr> X-Face: #2fb%mPx>rRL@4ff~TVgZ"<[:,oL"`TUEGK/[8/qb58~C>jR(x4A+v/n)7BgpEtIph_neoL KJBq0JBY9:}8v|j Organization: Universite de Mons-Hainaut (http://math.umh.ac.be/an/) X-Spook: SCUD missile NORAD SDI Nazi lynch North Korea infowar freedom bce S Box X-Blessing: Om Ah Hum Vajra Guru Pema Siddhi Hum X-Operating-System: GNU/Linux (http://www.linux.org/) X-Mailer-URL: http://www.mew.org/ X-Mailer: Mew version 4.2.53 on Emacs 22.0.50 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.1 (www dot roaringpenguin dot com slash mimedefang) X-Miltered: at nez-perce with ID 43EA6D17.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 christophe:01 troestler:01 christophe:01 troestler:01 umh:01 ocaml:01 mlton:01 threading:01 mlton:01 threads:01 gcc:01 semaphores:01 threads:01 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 On Wed, 08 Feb 2006, Xavier Leroy 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