docs
docs copied to clipboard
Benefits of unsafe code are ambiguously stated
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.
- ID: 63d6c264-db4c-ad5c-915a-79229deee212
- Version Independent ID: 6172bff9-e664-8475-a605-1526a907a1dc
- Content: Unsafe code and pointers - C# Programming Guide
- Content Source: docs/csharp/programming-guide/unsafe-code-pointers/index.md
- Product: dotnet-csharp
- Technology: csharp-advanced-concepts
- GitHub Login: @BillWagner
- Microsoft Alias: wiwagn
Thanks @jskeet I can see how this can be mis-interpreted. I'll add it to our backlog to update.