From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id A46497FF97 for ; Wed, 9 Mar 2016 11:07:38 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.24,311,1454972400"; d="scan'208";a="167785502" Received: from meleze.ens.fr (HELO [129.199.99.114]) ([129.199.99.114]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 09 Mar 2016 11:07:38 +0100 To: caml-list@inria.fr References: <000801d179e9$1865ca40$49315ec0$@ios.ac.cn> From: Francois Berenger Message-ID: <56DFF5E5.1050109@inria.fr> Date: Wed, 9 Mar 2016 11:07:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <000801d179e9$1865ca40$49315ec0$@ios.ac.cn> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] muti-core programming On 03/09/2016 10:50 AM, Áõ¼á wrote: > Hi, > > I¡¯m recently writing a formal verification tool in OCaml, and > it works really well, but I¡¯m considering writing a concurrent version. > However, until now, there seems to be no way to write programs that take > advantage of multi-cores. To accelerate something, probably you want paralellism, not concurrency. I recomend parmap, but there are some other libraries out there too for that purpose (in opam: forkwork and probably others I don't know). But be careful that too fine granularity calculations don't parallelize well. For example, if you are analyzing source code, maybe analyzing distinct files in parallel would be a coarse enough granularity. > So, I¡¯m wondering when will OCaml support > multi-core programming? Or else, do I have other choices by using some > external extensions of OCaml instead of the standard library? > > Thanks, > > Jian -- Regards, Francois. "When in doubt, use more types"