As a soft roll-out for distributing newer-than-v1 x86-64 tier 1 tools, the list could be extended by providing v1, v2, and v3 of each of the existing targets.
How?
First of all, the target used for building the compiler wouldn't go hand-in-hand with the target the compiler then targets by default. Bumping the default compilation target is a separate discussion. The suggestion below assumes that regardless of the target level the toolchain was built with, it would have the agreed-on default target.
Currently, the following x86-64 tier 1 with host tools targets are available:
x86_64-pc-windows-gnux86_64-pc-windows-msvcx86_64-unknown-linux-gnu
If implemented, the current targets would effectively be multiplied by three:
x86_64-pc-windows-gnu(v1, v2, v3)x86_64-pc-windows-msvc(v1, v2, v3)x86_64-unknown-linux-gnu(v1, v2, v3)
Rustup (itself deployed as v1 only) would have a dynamic run-time check for the architecture of the computer it is run on. Specifically, when downloaded and run, it would check if v3 or v2 are supported, defaulting to v1 if not. Then, it would install the highest level supported toolchain – manually overridable by the user. If we'd like to be even more careful, this could wait for n months/releases, while the toolchains would already be available and opt-in.
Why?
A performance improvement of ~1–3 % from using a v3 toolchain would become immediately available for many developers. Moreover, beginning the distribution of the newer toolchains would help iron out any possible bugs (testing in production, yay!) and maybe shift the implementation of new compiler optimizations towards changes that happen to favor the newer architectures.
We could also gather statistics on users' microarchitecture level preferences from the actually downloaded toolchains, which brings us to the next topic.
Anyway, it seems to me that taking the step towards using the newer microarchitecture levels by default is bound to happen at some point. Is there a good reason to wait still?
What about Users?
As for the demographic of gaming enthusiasts, according to the Steam Hardware Survey, almost everyone seems to have at least a v2 capable computer:
- CMPXCHG16B: 99.94 %
- LAHF / SAHF: 99.94 %
- SSE4.1: 99.82 %
- SSE4.2: 99.78 %
- SSSE3: 99.86 %
Currently, AVX2 prevalence is at 95.03 %. The demographic of developers is most likely a bit different, but I don't have any good data at hand. Anyway, I'd wager not a very significant number of developers are using a 20-year-old computer for Rust development – mostly because the compile times would probably not be nice.
If the subsequent shift in use would lead to different bugs being found & fixed and to different kinds of optimizations, the v1 users would possibly be left behind. However, I guess that's going to happen anyway at some point.
Downsides
- Effort.
- Maybe some cloud/bandwidth costs due to hosting more toolchains.