BenchmarkDotNet v0.13.12, Windows 10 (10.0.19045.3208/22H2/2022Update)
Intel Core i7-8550U CPU 1.80GHz (Kaby Lake R), 1 CPU, 8 logical and 4 physical cores
.NET SDK 8.0.100
  [Host]     : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2
  DefaultJob : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2
Method Mean ErrorStdDevGen0Gen1Allocated
ClassAllocSumForget155.68 ns1.608 ns1.425 ns0.0880-368 B
ClassAllocSumSaveInLastField179.87 ns1.211 ns1.133 ns0.0880-368 B
ClassAllocSumSaveInSmallArray200.24 ns3.746 ns3.321 ns0.0880-368 B
ClassAllocSumSaveInMediumArray261.18 ns3.055 ns2.858 ns0.05870.0582368 B
ClassAllocSumSaveInBigArray1,100.45 ns21.548 ns34.178 ns0.05720.0286368 B
StructAllocSumForget98.25 ns1.018 ns0.953 ns0.0305-128 B
StructAllocSumSaveInLastField100.64 ns2.014 ns2.068 ns0.0305-128 B
StructAllocSumSaveInMediumArray100.09 ns1.158 ns0.904 ns0.0305-128 B
StructReuseSumClear70.79 ns0.095 ns0.079 ns---
StructAllocSumForget_UNFAIR42.97 ns0.160 ns0.134 ns0.0306-128 B