[concurrency-interest] Fork/Join Examples

Joe Bowbeer joe.bowbeer at gmail.com
Fri May 25 00:05:06 EDT 2012

Thanks for the examples! I will certainly check them out.

Regarding a cache for recursive subdivision, search in JCiP and www for
Memoizer and you will find some of our attempts.
On May 24, 2012 3:41 PM, "Dr Heinz M. Kabutz" <heinz at javaspecialists.eu>

> In my latest newsletter, I show two examples how we can solve a problem
> faster using Fork/Join.  The first is Fibonacci, but a better recursive
> algorithm than is found in the JavaDocs.  However, this sum-of-squares
> algorithm requires us to do multiplication which is particularly bad with
> BigInteger.  I thus also implemented the Karatsuba multiplication
> algorithm, including a way to do it with the Fork/Join framework.
> I also implemented a FibonacciCache.  I believe that caching should maybe
> be solved in general for the recursive decomposition approach with
> RecursiveTask.  In my cache, if one thread tries to do work with which
> another thread is already busy, then he waits until the other thread has
> completed his task.  This prevents duplication of work.  I bet that this is
> a common problem with recursive decomposition algorithms.  Have any of you
> thought of writing a cache that solves this problem in general and then
> making that available in the JDK?
> Also, could we *please* change the example in the RecursiveTask JavaDocs.
>  It is embarrassing having an exponential algorithm as an example of how
> you would use RecursiveTask.  So if we add 1000x the number of processors,
> we can now solve case n+10?
> Here is a direct link to the newsletter for those who are interested:
> http://www.javaspecialists.eu/**archive/Issue201.html<http://www.javaspecialists.eu/archive/Issue201.html>
> Regards
> Heinz
> --
> Dr Heinz M. Kabutz (PhD CompSci)
> Author of "The Java(tm) Specialists' Newsletter"
> Sun Java Champion
> IEEE Certified Software Development Professional
> http://www.javaspecialists.eu
> Tel: +30 69 75 595 262
> Skype: kabutz
> ______________________________**_________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.**oswego.edu <Concurrency-interest at cs.oswego.edu>
> http://cs.oswego.edu/mailman/**listinfo/concurrency-interest<http://cs.oswego.edu/mailman/listinfo/concurrency-interest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20120524/49b78d27/attachment-0001.html>

More information about the Concurrency-interest mailing list