Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
OCaml and implicit parallelism (threading)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Wolfgang Lux <wlux@u...>
Subject: Re: [Caml-list] OCaml and implicit parallelism (threading)
Vasili Galchin wrote:

> Hello,
>      I have: OCaml 
> allows explicit threading through the Unix library, but are there any 
> plans to do use implicit parallelism (via the OCaml compilers) to do 
> parallel expression evaluation where possible?

I can't speak for Inria, but I would not expect them to do anything in
that direction. The problem is that the implicit parallelism in
functional languages is usually much too fine grained. For instance,
consider the expression
   sqr 3 + sqr 6
where sqr is defined as fun x -> x * x. The function sqr is side effect
free, so in principle both multiplications could be evaluated in 
However, the overhead for generating new parallel threads for these
computations is -- obviously -- much too high. It is a very delicate
decision when to parallelize computations and most people agree that
this decision is best made by the programmer. At least nobody has come
up with a generic algorithm for exploiting implicit parallelism in a
reasonable way (i.e., such that there is really a gain in efficiency).