[racket] Racket and concurrency

From: Harry Spier (vasishtha.spier at gmail.com)
Date: Tue Jul 3 12:33:58 EDT 2012

I'm starting to look at Racket concurrency functions (futures and
places) to increase the efficiency of my application and I have a few
questions.  Its an OCR application so that once I've segmented the
text and created a data-structure to describe the text, the processing
can be done concurrently at either higher or lower levels.  I.e. I can
process pages of a book concurrently, or I can process the pages
sequentially and process lines on a page concurrently or again I can
process lines sequentially but process letters concurrently.

So my questions are:
1) Since there is no communication between my concurrent processes
other than combining the results does it make more sense to use places
rather than futures.

2) Is it better to do the concurrency at the highest level possible or
at the lowest level possible. I.e. should I be processing pages
concurrently or should I go to a much lower level and only be
processing letters concurrently.  Does it matter?

3)  How does hyperthreading affect the number of places or futures I
can run concurrently? For example if I have an i7 with 4 cores and
hyperthreading, will that run 4 or 8 places concurrently?

4) Are there any "gotcha's" I need to look out for?

Thanks,
Harry

Posted on the users mailing list.