BT

InfoQ Homepage News Automatic Parallel Processing, Will It Work?

Automatic Parallel Processing, Will It Work?

Bookmarks

Larry O'Brien questions the assumption that multi-core processors and languages that can leverage them will necessarily lead to performance gains.

The theory is simple. The lack of side effects in functional programming techniques naturally lends themselves to parallelism. Of particular interest of late is the Map function, in which a function is applied to each element in an array.

The optimist sees this and says "Ah hah! The compiler can simply distribute these calculations to a thread-pool and have a performance advantage on a manycore machine." And this is true if (a) f is quite lengthy or (b) the array is quite large. Otherwise, the overhead of distributing the calculation across cores / processors can very well be greater than performing the map "in core." In the worst case, when function and data are already inside the initial core's cache, the performance hit for distributing it would be very substantial.

As a historical comparison, Larry mentions the C/C++ inline keyword. He claims that for the most part it was a disaster. "But most developers do a poor job estimating the benefit of the inline keyword. Because, just as distributing map can be counter-productive, inlined code can decrease performance (the on-chip caches of modern processors make code size and data locality very important to performance)."

  • Will languages that promise every call is distributed be sophisticated enough to overcome the performance issues of prematurely parallelizing?
  • Will languages that require to programmer to specify when parallelization occurs be a disaster in the hands of mainstream programmers like inline?
  • Is there a hybrid approach that will solve both these problems?

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • typo

    by Frans Bouma /

  • typo

    by Frans Bouma /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    s/keyboard/keyword
    :P

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.