[racket] Concurrent execution

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Fri Sep 30 23:02:01 EDT 2011

Futures will let you share data, but you'd have to try to avoid
allocation in the futures (not completely, just mostly) for good
performance (so you'd probably want to build vectors to save the
results into). For places, you cannot share the database, you'd have
to send if over a place channel to be able to use it in multiple cores
at once.

It is hard to say which is going to be better for your task; probably
futures will be easier to try, so you might start there. They are more
limited, tho, so you might end up switching to places.

Have you read the section on performance in the Guide? That provides
an overview that you might find helpful.


2011/9/30 Ivanyi Peter <pivanyi at freemail.hu>:
> Hi All,
> I would like to ask for some advice.
> I have a problem in which I have several lists containing some data. These
> lists are created by one
> "process" and this part should be sequential. Then these lists should be
> checked against some
> large "database", list or hash table, and as a result some new lists must be
> built, which at the end must
> be merged. I would like to do this later processing concurrently on several
> cores.
> I am a little unsure which method to use: futures, places, threads,
> processes???
> (I am kind of familiar with parallel programming in C and MPI, but not this
> fine grained level.)
> I am not sure a couple of things here:
> - how to "distribute" the several lists to the "processes" ? (I do not want
> to use files for this) Is it possible?
> - how to merge the resulting lists at the end? Is it possible?
> - how to share, if it is possible at all, the common "database", list or
> hash table? If this is not really
> possible, it is not a problem I can "load" it in on each "process". (At
> least I hope.)
> Any suggestions?
> Thanks in advance,
> Peter Ivanyi
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users

Posted on the users mailing list.