The benchmark is improperly testing the Max operation because as all the numbers are 0 only a single path will be tested.
The benchmark is improperly testing the Max operation because as all the numbers are 0 only a single path will be tested.

The side effect is that the microarchitecture is able to branch predict everything and also there are no load-store dependencies (which is not true in the general case).
I modified the test to account for a random array and also added other ways to calculate Math.Max which would showcase the impact on instruction level parallelism in the face of store-load dependencies.

adamsitnik/BenchmarkDotNet,Teknikaali/BenchmarkDotNet,Teknikaali/BenchmarkDotNet,Ky7m/BenchmarkDotNet,Teknikaali/BenchmarkDotNet,Ky7m/BenchmarkDotNet,Ky7m/BenchmarkDotNet,PerfDotNet/BenchmarkDotNet,adamsitnik/BenchmarkDotNet,redknightlois/BenchmarkDotNet,PerfDotNet/BenchmarkDotNet,Ky7m/BenchmarkDotNet,redknightlois/BenchmarkDotNet,PerfDotNet/BenchmarkDotNet,adamsitnik/BenchmarkDotNet,alinasmirnova/BenchmarkDotNet,ig-sinicyn/BenchmarkDotNet,ig-sinicyn/BenchmarkDotNet,alinasmirnova/BenchmarkDotNet,adamsitnik/BenchmarkDotNet,alinasmirnova/BenchmarkDotNet,alinasmirnova/BenchmarkDotNet,ig-sinicyn/BenchmarkDotNet,ig-sinicyn/BenchmarkDotNet,redknightlois/BenchmarkDotNet