RFR 8012647: Add Arrays.parallelPrefix (prefix sum, scan, cumulative sum)

David Chase david.r.chase at oracle.com
Thu Jun 13 12:02:58 UTC 2013


On 2013-06-13, at 7:30 AM, Doug Lea <dl at cs.oswego.edu> wrote:

>> On 13/06/2013 10:30, Chris Hegarty wrote:
>>> On 06/12/2013 05:07 PM, Alan Bateman wrote:
>>>> On 12/06/2013 15:50, Chris Hegarty wrote:
>>>>> ...
>>>> Is the name final? Just curious if other names such as parallelScan
>>>> have
>>>> been considered (and discarded).
>>> 
>>> I think we should be open to discussing the name, but I will have to
>>> defer to Doug as to whether other names were considered/discarded.
> 
> Well, I originally called it "cumulate" and still like it best,
> but others on expert group suggested parallelPrefix as less
> likely to be confused with other methods they may be looking
> for. So at this point I think we should stick with it.

I think it's worth discussing.  The expert group is going to be predisposed to go with the jargon that they know, not unlike habitual Lisp hackers thinking that "car", "cdr" and "cons" are perfectly natural names for operations.  This is our chance to avoid baking in clunky jargon, and I think that in a few years we'll assume all sorts of stuff is done in parallel, and methods named parallelThis and parallelThat will be anachronisms.

The one huge advantage of parallelPrefix is that if you drop it into Google, the first result delivered is the one that you want (Wikipedia on "prefix Sum").  "prefix Cumulate" also delivers that page, though with the suggestion "did you mean prefix cumulus"?  The other advantage is that we have no particular assurance that we'll invent anything better.

And matlab, numpy, R, TI Basic, and Oracle OLAP DML call it (or a specific version of it) "cumsum".  R's version of cumsum is pretty generic, and cumsum gets decent hits from Google.  "Cumsum", however, shows clear signs of 6-letter-jargon itself.

"Cumulate" by itself doesn't yield useful hits, at least not today.

David




More information about the core-libs-dev mailing list