Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: Why OCaml sucks
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Berke Durak <berke.durak@g...>
Subject: Re: [Caml-list] Re: Why OCaml rocks
On Sat, May 10, 2008 at 12:26 AM, Richard Jones <rich@annexia.org> wrote:

> On Fri, May 09, 2008 at 11:13:26PM +0200, Berke Durak wrote:
> > - For sharing complex data, you can marshall into a shared Bigarray.
> >
> > If the speed of Marshal becomes a bottleneck, a specialized Marshal that
> > skips most of the checks/byte-oriented, compact serialization things that
> > extern.c currently does could speed
> > things up.
>
> At the risk of sounding like a broken record ...  OR you could use
> Ancient which does the above, right.
>

I just looked at the interface and in spite of an initial difference in aims
(sharing large, static data between processes), Ancient seems to be almost
what's needed for parallelism.

It could be used as an IPC mailbox, provided you map /dev/shm, come up with
some cheap means of synchronizing your processes (possibly by using a
futex?)
and ensure that the creation/deletion functions do not have too much
overhead.

But you are saying in the README that values in the ancient heap have some
limitations, namely no ad-hoc polymorphic primitives.  That may be
acceptable
for sharing a large static database but won't cut the mustard for cheap
message-
passing.  So we need a function to copy back an ancient value in the heap so
that
it can be used normally, which is what I was talking about: a simplified,
cheaper
Marshal module.
-- 
Berke