English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Re: [Caml-list] The closing gap (warning: long, inflammatory rant)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-04-21 (20:47)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] The closing gap (warning: long, inflammatory rant)
On Mon, Apr 21, 2008 at 03:44:08PM +0100, Jon Harrop wrote:
> On Monday 21 April 2008 14:11:51 Richard Jones wrote:
> > Your threaded code is going to look really stupid when you have NUMA
> > machines with dozens of cores.  Why are we optimizing for a case (SMP)
> > which will only be around for a few years.  Arguably SMP isn't even
> > around now ... the AMD machine on which I'm typing this is firmly NUMA
> > with a good 10% penalty for accessing memory owned by the other
> > socket.
> 10% is nothing compared to the orders of magnitude cost of message passing.

Or you could use shared memory (as I said below).  How do you think
shared memory works in a NUMA machine anyway?

> > > A concurrent GC should be developed.  But I think you can compete in
> > > some "niches" without a concurrent GC.
> >
> > Why should a concurrent GC be developed?  Threaded code is a nightmare
> > to write & debug, and it's only convenient for lazy programmers who
> > can't be bothered to think in advance about how they want to share
> > data.  OCaml supports fork, event channels & shared memory right now
> > (and has done for years) so there is no penalty to writing it
> > properly.
> Ten years ago that was:
>   "Why should we use gargage collection? Garbage collectors are a nightmare to 
> implement and debug and are only useful for lazy programmers who cannot be 
> bothered to deallocate values themselves. C++ has reference counting right 
> now and there is no penalty for using it properly."

Thanks for the straw man argument there.  Garbage collectors and _not_
using threads both improve the safety of the language.


Richard Jones
Red Hat