-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Enhancement RequestedProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additions
Milestone
Description
Marshal.SizeOfreturns the size of the unmanaged view of the struct.sizeofreturns the size of the managed view of the struct.
Unmanaged and managed views are identical for the blittable structs. It is better to use
sizeofinstead ofMarshal.SizeOffor blittable structs. They return the same number andsizeofis much cheaper.
There are many uses of Marshal.SizeOf in the codebase - many of them likely for blittable types - that could be identified and updated to use faster sizeof.
/cc @dotnet/dotnet-winforms - This probably applies to Winforms as well.
batzen, miloush, lindexi and HavenDV
Metadata
Metadata
Assignees
Labels
Enhancement RequestedProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additions