It’s long ago, but I worked nicely with parallelization on a CDC 205 both in 
assembler and Fortran (CDC has expired shortly after). IIRC it did not protect 
against simultaneous updating the same memory location. But what I do recall is 
that it is very important that parallel processes use distinct parts of memory. 
So I wonder: give each future or place its own copies of the data they need and 
produce data in locations local within the place or future before returning 
them. Of course it may happen that a procedure is called for which Racket 
cannot know which parts of memory it will access. But for (very) primitive 
arithmetic functions this should be an avoidable problem, I think.
Just my single one cent.
Jos
 

From: Robby Findler
Sent: 17 June 2020 17:23
To: Brian Adkins
Cc: Racket Users
Subject: Re: [racket-users] Re: trying to use futures for some calculations

On Wed, Jun 17, 2020 at 8:56 AM Brian Adkins <br...@lojic.com> wrote:
On Wednesday, June 17, 2020 at 4:50:44 AM UTC-4, Alex Harsanyi wrote:

I am trying to speed up an algorithm using futures, but I am getting some 
unexpected results (and no real speed improvements), and I was wondering if 
someone more experienced could have a look a the code and tell me what am I 
doing wrong.
[...]

I would *love* to be proven wrong on this, but I think it's rare to be able to 
get decent parallelization in practice using futures. You may have better 
results using places, but it will depend on how the amount of processing for a 
unit compares to the overhead of communicating with the places i.e. you may get 
better results with 2 places than with 8 due to place communication overhead. 
In your case, if it's easy for the places to input their own sets of 
parameters, then the place overhead may be small since I think each place would 
simply need to communicate its best value.


While this may be true, it is also the case that the design of futures is such 
that incremental work on the primitives turns into incremental ability to 
parallelize programs. So while it is likely to be more work today, it may also 
be the case that people putting effort in to help their own programs will help 
us turn the corner here. Perhaps this is a place where an interested 
contributor can help us out a lot!

Robby

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAL3TdOPnzjMdTEOU%2BdO34B8VAfXzORSVHfXYx6tV-8DVGZ7oXw%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/5eea438f.1c69fb81.872f7.149c%40mx.google.com.

Reply via email to