Talk:Parallel calculations

From Rosetta Code
Revision as of 10:28, 21 December 2010 by rosettacode>Paddy3118 (→‎Python example?: Still seems OK to me, w.r.t. the task description?)

Python example?

Sure looks to me as if it is outputting the smallest factor (of a list of numbers). Which I don't think is what the task is asking for.

Hint: look-up map in the Python reference. P.S. please sign your edits here, thanks. --Paddy3118 07:13, 21 December 2010 (UTC)
I didn't doubt the parallelism. My intention for the task was that to have multiple threads/processes do some parallel calculations (factorize the numbers), and then have the main process receive the results, and proceed with other calculations based on the results. Finding an extremum in these numbers is just an example, the main process might well want to do other things with the returned lists. The current Python solution is different in that it respect: It searches for the minimum already in the sub-process (returning a single number from lowest_factor), but this is not what the task asks for: Return that number and its prime factors. --Abu 09:02, 21 December 2010 (UTC)
Hi Abu, the lowest factors of each of the numbers are returned to the main process where the minimum is then found. A full prime factorization of the numbers seems wasteful given the task description and that the smallest prime factor is computed first.
Should you the modify the task to state explicitely that all prime factors should be returned or should you keep this aspect un-specified? I, (of course), think that the current task keeps the focus on the parallelism and that specifying that all factors should be computed when only the smallest is needed goes against your need for speed. --Paddy3118 10:28, 21 December 2010 (UTC)