How to use pointers to write more efficient code. C# problem
There are two main use cases for pointers in C#:
In other cases it does not help. It also does not help with arrays where the bounds check is eliminated anyway.
It can also hurt code quality with the current JIT because it is not particularly optimized for raw pointers.
In any case: it is important to understand why it can help so you can predict where it will be helpful and where it will be useless.
Get Answers For Free
Most questions answered within 1 hours.