Channels ▼

Jonathan Erickson

Dr. Dobb's Bloggers

When Seeing Is Believing

February 26, 2009

So you aren't ready to buy into this multicore and parallelization stuff until you're able to see its benefits with your own eyes? If that's the case, then take a couple of minutes to watch this pair of YouTube videos that Gaston Hillar has prepared as part of his book C# 2008 and 2005 Threaded Programming: Beginner's Guide.

In the first video entitled Running Multiple Processes to Understand Multicore CPUs Power, Hillar runs a simple For-loop application 36 million times on 1 core of a quad-core processor. According to the graphical parallel performance tester Hillar uses, the application uses about 30% of the CPU's power and takes 6 seconds to complete. He then modifies the application (C# source code provided)to run 4 instances of the application, each running on a separate independent core. In this case, the 4 cores used about 100% of the CPU's power, executing all 4 programs in about 7 seconds.

In the second video Exploiting a Quad-core CPU Using C# Parallel Programming, Hillar takes a different approach. In this instance, he runs an application on 1 core of a quad-core processor that executes the algorithm in 8 seconds using 25% of the CPU's power. He then modifies the application (again, C# source code provided) to run 4 concurrent threads -- one per core -- and the applications executes in just 2 seconds.

Gaston Hillar isn't alone in using YouTube to spread the word about the advantages of multicore (not to mention his book). The folks at Connective Logic have a series of YouTube videos (presented by chief architect Jeremy Orme) on the benefits of adopting a "parallel first" approach to developing new applications, starting with Multicore Programming: Parallel First, Serial Later: Part 1 (also see Part 2 and Part 3). If this sounds familiar, Jeremy Orme is co-author of the article series "Multi-Core OO" presented here (Part 1, Part 2, and Part 3).

Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 


Video