Previous | Next --- Slide 30 of 79
Back to Lecture Thumbnails
Holladay

For this simple example, if we had to choose only multi core or only SIMD, which would be faster?

One would guess that SIMD has an advantage in that it shares the reading of the instructions. However, I'm curious if this is still true given the overhead each might have.

tcm

That's an excellent question, @Holladay. As you mentioned, SIMD would probably win, but multi core will also do well.

In practice, we usually don't need to choose one over the other, because most systems today support both. In other words, the answer to "do you want multi core or SIMD" is usually "yes, I'll take both, thanks!" :-)

tcm

Actually, here's a brain teaser for all of you. For the program above, an experienced parallel programmer would probably argue that even if the performance difference between N-way multi core performance and N-way SIMD performance is a wash for a particular program, it would be foolish to not take full advantage of SIMD parallelism (and instead compile the code to only make use of parallel threads). Why is that?

rehn1992

Threads are software resources and handled by OS, OS will arrange them and try to make cores busy all the time. But SIMD uses hardware resources, if we don't take fully advantage of them, then the ALU with nothing to do will just wait there.