Skip to content

Conversation

@Sergio0694
Copy link
Owner

@Sergio0694 Sergio0694 commented Nov 23, 2023

Closes #551, contributes to #598

Description

This PR removes all typeof(T).GUID uses across ComputeSharp, and replaces them with RVA fields.
Sames ~300 KB in the self-contained native library sample, without reflection-free enabled.
These changes also make ComputeSharp.D2D1 work in reflection-free mode with NativeAOT 🚀

image

Note

Sizoscope only reports ~274 KB saved, but the actual binary is 304 KB smaller.

@Sergio0694 Sergio0694 added the optimization 🚀 Performance improvement to existing APIs label Nov 23, 2023
Also adopt collection expressions for all IIDs
@Sergio0694 Sergio0694 merged commit 4daad86 into main Nov 23, 2023
@Sergio0694 Sergio0694 deleted the dev/native-guid branch November 23, 2023 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

optimization 🚀 Performance improvement to existing APIs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

typeof(T).GUID calls are rooting ~300 KB worth of reflection stuff

2 participants