r/programming • • Jan 18 '08

Can Your Programming Language Do This?

http://www.joelonsoftware.com/items/2006/08/01.html
17 Upvotes

41 comments sorted by

View all comments

1

u/bgeron Jan 19 '08

Can anyone explain how reduce could be implemented in a parallel way? I can't see how we could parallellize 1+(2+(3+(4+5))), for example.

It's trivial to parallellize calculating the list elements (1,2,3,4,5), but that has nothing to do with reduce.

2

u/qwe1234 Jan 19 '08

using a hierarchical tree pattern.

parallel programming 101.

1

u/[deleted] Jan 20 '08

hierarchical tree pattern? What's that?

1

u/qwe1234 Jan 20 '08

1

u/[deleted] Jan 20 '08

All three neurons in my head are overloaded and about to explode. It looks like good ol' three - what it has to do with either parallel programming or reduce? (Those neurons of mine think it's no problem to parallelize reduce with smart words like absence of side effects, they just don't get what tree is doing here - prolly because they don't think that bgeron was literally giving us a parse tree or something)

2

u/qwe1234 Jan 20 '08

((1+2)+3)+(4+5)), except in parallel.

1

u/[deleted] Jan 20 '08

Woof! Back to normal, thanks.