Enabling march and mtune for kernel builds

-O3 is probably within even just variance – even without considering the massive error bars that memory layout as a measurement bias imposes.

The article contradicts this prediction. The tests involving IO show quite significant regressions when using -march=native. They’re so significant that they probably cannot be explained by measurement bias either but even here I don’t think we can be sure.

See Pre-RFC: Gradual Transition of NixOS x86_64 Baseline to x86-64-v3 with an Intermediate Step to x86-64-v2

TL;DR:

  • no reliable data showing any benefit in switching to v2 that cannot be explained by known measurement biases (or demonstration that the measurement biases are less significant/relevant nowadays)
  • anecdata that people still use NixOS on v1-only CPUs and would no longer be able to
  • v3 (or higher) might improve perf significantly (don’t have an overview over the data rn) but it doesn’t matter as that would probably cut off too many users
  • dynamic alternatives to raising the march level globally exist in userspace and should be explored first