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 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 put up the code in this repository: https://github.com/alex-hhh/cp3-exeriments, unfortunately it is the simplest meaningful example that I can come up with. Most of the functions, however are just support functions and there are six implementation of the same algorithm.
[...]
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
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CAL3TdOPnzjMdTEOU%2BdO34B8VAfXzORSVHfXYx6tV-8DVGZ7oXw%40mail.gmail.com.
In addition, some time ago I did use futures which did parallelization very well when using distinct parts of the same vector. I did not need unsafe for that.
Jos
> an email to racket...@googlegroups.com
> <mailto:racket-users+unsub...@googlegroups.com>.