C/C++ compilers allows passing hints to the optimizer using `__assume` or similar constructs. It would be useful to have same capability in .NET. One use case was discussed in https://github.com/dotnet/corefx/issues/5474#issuecomment-172653606: ``` Unsafe.Assume((p & 0x1F) == 0); Unsafe.Write<Vector<double>>(p, v); ``` category:proposal theme:optimization skill-level:expert cost:large
C/C++ compilers allows passing hints to the optimizer using
__assumeor similar constructs. It would be useful to have same capability in .NET.One use case was discussed in https://github.com/dotnet/corefx/issues/5474#issuecomment-172653606:
category:proposal
theme:optimization
skill-level:expert
cost:large