Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C#: Consider using Unsafe instead of BitConverter to convert values to/from bytes #1014

Open
dicej opened this issue Aug 1, 2024 · 0 comments
Labels
gen-c# Related to the C# code generator

Comments

@dicej
Copy link
Collaborator

dicej commented Aug 1, 2024

Per dotnet/runtimelab#2614 (comment), Unsafe.Write and Unsafe.As might be more efficient than BitConverter.TryWriteBytes and BitConverter.To*, respectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gen-c# Related to the C# code generator
Projects
Status: No status
Development

No branches or pull requests

2 participants