VOGONS

Common searches


First post, by Hoping

User metadata
Rank Oldbie
Rank
Oldbie

For the last two or three years, new video games have often required a specific set of processor instructions, for example SSE 4.2. The case is that in some cases they have simply released an update that eliminated that requirement without affecting performance, or so I think, for example RE7 or FFXV.
The most "powerful" system I have is a Phenon II 1100T with 16GB of RAM and a RX580.
Using the intel SDE emulator I was able to start and test games like DOOM Eternal which runs very well and Beyound two souls which also works well. I discarded other games after checking that requirement.
The fact is that now I found Resident Evil 3 (2020) and I expected some problem but no, no problem. The graphics quality at 1080p is very good in my opinion.
So the question I ask myself is. What led programmers to require these sets of instructions when games could run without them?
Opinions.

Reply 2 of 10, by Oetker

User metadata
Rank Oldbie
Rank
Oldbie

Yes, it's due to (default) compiler options. I guess many developers just use the default settings, or would would rather improve performance for people with modern processors, than cater to those with 10 year old CPUs, and as such use the (theoretically) faster compiler option. However, I sincerely doubt they actually test how much of a performance difference falling back to e.g. SSE2 would entail.

The 'best' way would be to detect the CPU and run a different code path, but that's a lot of extra development and maintenance work.

Reply 3 of 10, by Hoping

User metadata
Rank Oldbie
Rank
Oldbie

So it's just a matter of not wanting to worry about optimizing the performance of their programs. There was never a situation like this I think. In my case the games that could use to a certain extent the six cores (of what I think is the first desktop CPU with more than four "real cores" Well I7's had hyper threading, so "eight cores".) came on the market a few years after the processor.
While it is true that this mainly affects AMD processors of the time, discard them only because of the default compiler options when the processors can still give adequate performance even when using an emulator to cheat the game...
I do not know what to think.

Reply 4 of 10, by DracoNihil

User metadata
Rank Oldbie
Rank
Oldbie
jmarsh wrote on 2020-10-05, 14:26:

Too lazy/ignorant to change the default compiler settings to prevent them from using those instruction sets.

Do these compilers even actually understand these instruction sets? I've always been under the impression the software developer has to write very specific inline code to take advantage of newer SSE's and AVX and whatever.

“I am the dragon without a name…”
― Κυνικός Δράκων

Reply 5 of 10, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

GCC vector intrinsic works very well with SIMD instructions for SSE2 and newer. It is less likely to require hand-tuned assembly to pull the tricks nowadays. Contrary to GCC docs, it does not work with MMX/3DNow!. SSE2 is standard instruction sets on x86-64, so 64-bit binaries always get it.

Reply 6 of 10, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie

They're not just vector instructions. SSE3 includes a FPU/x87 instruction for example, and AVX2 has a bunch of general purpose instructions (collectively referred to as BMI).
Otherwise there may be standard runtime function (memcpy etc.) that the compiler chooses/links when certain optimisations are enabled.

Reply 7 of 10, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

You are probably right, but I find vectorizing probably most useful and it was the common use cases for writing hand-tuned assembly to speed things up for things like byte/word lane arithmetic, fields extraction and pixel processing etc. For old codes using hand-tuned assembly to achieve that, they can now be replaced with very nice, readable and portable GCC vector intrinsic.

Reply 8 of 10, by Hoping

User metadata
Rank Oldbie
Rank
Oldbie

So with recompiling the programs giving options to support older architectures it would be possible for everything to continue working I suppose.
My only compilation experience comes from installing Gentoo Linux twice so it's not much.

Reply 9 of 10, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

Sometimes, if one knew that supporting old architecture is out of scope, then one could simply turn on SIMD vectorization to get free performance boost. It is *free* because all one needs to do is to recompile the codes without spending any efforts in CPU detection and providing separate code paths for specific instruction sets. Do not underestimate the temptation of such being *free*. The performance can be significant when the data sets are optimized for SIMD, such as pixels processing, as much as 30%.

Today, modern libc string functions, memcpy and friends are SIMD optimized. If one pays attention to data alignment, then the codes will automatically enjoy the speed boost.

Reply 10 of 10, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie

AVX doesn't even need alignment, they realized it was dumb to impose that restriction on SSE instructions instead of letting the silicon fix up misaligned accesses.

For 64-bit CPUs I think it's still faster to use the GPRs and integer instructions to do SIMD for things like strlen/strcmp. The instructions are shorter so there's less pressure on the cache, and for AVX a lot of chips will stall when transitioning/activating the required execution unit.