30% optimization of `DateTime.GetDate()`/`.Year/.Month/.Day/.DayOfYear` by 'Euclidean affine functions' by SergeiPavlov · Pull Request #72712 · dotnet/runtime
This optimization based on article
Cassio Neri, Lorenz Schneider - Euclidean Affine Functions and Applications to Calendar Algorithms - 2021
It avoids loops and minimizes branching in calendar calc...
GitHub