Group Abstract Group Abstract

Message Boards Message Boards

0
|
130 Views
|
1 Reply
|
1 Total Like
View groups...
Share
Share this post:

Mathematica help descriptions for Parallelize are needlessly complicated

Posted 4 days ago

Complaint: The examples in the Mathematica Help are needlessly complicated, and in fact hinder the process of informing the user. Here's an example:

The first example of the use of Parallelize, in the definition of the Parallelize operation, is

(1)  Parallelize[Map[Composition[Framed,FactorInteger],{1,11,111,1111,11111,111111}]]

This is more or less

(2) Parallelize[{FactorInteger[1], FactorInteger[11], FactorInteger[111], FactorInteger[1111], FactorInteger[11111], FactorInteger[111111]}]

Which takes about 50% more characters, but only two operators (Parallelize and FactorInteger) instead of five (Parallelize, Map, Composition, Framed, FactorInteger).

But, in fact, neither (1) or (2) tells the reader anything more about what Parallelize does, or how to use it, than

(3) Parallelize[{1^2, 2^2, 3^2, 4^2, 5^2, 6^2}]

(3) has no operators other than the one which the example is there to explain. And it has fewer characters than (1) or (2).

Can anyone defend why (1) should be the example instead of (3).

POSTED BY: David Golber

I agree that the first Example could be a simpler problem. But generally I look at the entire "basic examples" section, and then the "Scope" section. But I think Parallelize is (mainly) designed for parallelizing Map (and friends) and function with iterators like Sum, Do, Table etc. That Parallelize[list] evaluates the elements separately is perhaps not the main usage?

I think the main reason for the choice of FactorInteger is that it is a function that typically takes a long time to evaluate. But the Frame and Composition makes it more complicated than needed indeed…

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard