docs icon indicating copy to clipboard operation
docs copied to clipboard

Benefits of unsafe code are ambiguously stated

Open jskeet opened this issue 3 years ago • 1 comments

As observed via https://stackoverflow.com/questions/63923968, the claim that:

In some cases, unsafe code may increase an application's performance by removing array bounds checks.

... can me read as "it makes existing code go faster" rather than "it allows you to rewrite your code to avoid array bounds checks, therefore potentially making it faster".

As far as I'm aware, marking a block as unsafe has no performance impact on its own, and it would be good for the page to be clear about that.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

jskeet avatar Sep 16 '20 16:09 jskeet

Thanks @jskeet I can see how this can be mis-interpreted. I'll add it to our backlog to update.

BillWagner avatar Sep 17 '20 13:09 BillWagner