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

Minor performance improvements to MarshalBlittable<T> #1502

Merged
merged 2 commits into from
Feb 10, 2024

Conversation

Sergio0694
Copy link
Member

This PR includes a couple of performance improvements to MarshalBlittable<T>:

  • Use sizeof(T) instead of Marshal.SizeOf<T>
  • On .NET 6+, replace a temporary pinned GCHandle with MemoryMarshal.GetArrayDataReference

@Sergio0694 Sergio0694 added the performance Related to performance work label Feb 8, 2024
@Sergio0694 Sergio0694 merged commit 56462b5 into staging/AOT Feb 10, 2024
9 checks passed
@Sergio0694 Sergio0694 deleted the user/sergiopedri/tweak-marshal-blittable branch February 10, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Related to performance work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants