SSE2 has added packed instructions for integers.
Does this make the use of mmx obslete?

When should i use mmx or sse2?

Thank you.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Obviously, use them where they're going to do some good.

You also have to consider, do you want your program limited to run on only the newer machines that have the extra instructions?

First your program should check for the presence of MMX and/or SSE2, and/or their AMD equivalents.
The CPUID instruction returns a bunch of useful info about the current CPUs capabilities.

Then your program should mull over whether it can best do the hard inner loops using one or the other.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
In addition to grg99's answer, I would like to tell that
in contrast to MMX that is using existing CPU resources, SSE adds 8 independent 128-bit registers: XMM0 - XMM7.
And it allows you to solve MMX problems - you do not need commands like EMMS for switching modes.
Also SSe has additional 32-bit control/status register MXCSR.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.