Benefit of using multiple SIMD instruction sets simultaneously

Tags: c++ c sse simd mmx
By : jakogut
Source: Stackoverflow.com
Question!

I'm writing a highly parallel application that's multithreaded. I've already got an SSE accelerated thread class written. If I were to write an MMX accelerated thread class, then run both at the same time (one SSE thread and one MMX thread per core) would the performance improve noticeably?

I would think that this setup would help hide memory latency, but I'd like to be sure before I start pouring time into it.

By : jakogut


Answers

SSE and MMX use the same registers, so it doesn't matter which of the two you use (apart from MMX sucking and SSE being useful, of course)

The better question is how SSE is implemented on your target CPU. Does it have a SSE unit per core? (probably) If so, then you might as well run SSE instructions on every thread.

If it has a shared SSE unit between cores then different threads will be fighting over it so there won't be much gained by executing SSE instructions in multiple threads. (I don't know if any CPUs actually share the SSE unit between threads though, so take this as a hypothetical case)

By : jalf


This video can help you solving your question :)
By: admin