If I download, say, debian-11.7.0-amd64-netinst.iso - does it somehow dynamically adapt to all the different AMD and Intel CPUs and uses the instructions available on the users machine?
If I download, say, debian-11.7.0-amd64-netinst.iso - does it somehow dynamically adapt to all the different AMD and Intel CPUs and uses the instructions available on the users machine?
In short, distributed binaries tend to use "least common denominator" instructions.
I believe one of the pros touted of Gentoo, where everything is compiled locally, is that all the software uses the CPU to it's fullest potential.
So all new CPU instructions of the last 40 years are pretty much used by nobody?
Of course, I don't think many people are using i386 builds anymore - most people would have switched to the more modern x86_64 long ago.
1. https://www.debian.org/releases/jessie/i386/ch02s01.html.en
2. https://www.debian.org/releases/stretch/i386/ch02s01.html.en
There are new instructions that can be used to write a constant-time SHA-256 hash function. A program that contains megabytes of code, more than a million instructions, may reasonably contain only a few of those instructions, because it contains only one or two small hash functions. The instructions are important and effective, but occur only a handful of times among a million instructions.
If you're running software that's heavily math intensive, or ever gets benchmarked, it's a fairly good bet that they will have either conditionally-installed or conditional-executed code that targets more modern processors.
Debian dropped support with sarge in 2005
see https://github.com/bminor/glibc/blob/glibc-2.31/sysdeps/x86_...
You'll find lots of discussions happening around this topic, for example: https://www.phoronix.com/news/Arch-Linux-x86-64-v3-Port-RFC
.Net ahead-of-time compilation (that is, compiling the .net / clr VM byte code into something your CPU can run directly) could (but apparently doesn't?) do CPU-specific optimizations. The JIT compiler, however does do some CPU-specific optimizations.
Not all, but surely a few.