micdah / RtMidi.Core

RtMidi for .Net Standard
https://rtmidicore.micdah.dk/
Other
36 stars 12 forks source link

Assert if C# 7.2 ref struct (stack-only struct) is applicable #10

Closed micdah closed 1 year ago

micdah commented 6 years ago

Should help performance by ensuring messages are kept on the stack at all times, removing any allocations.

Caveat: Harder to code with, as messages cannot be stored on heap (no class fields, no usage as generic type such as storing messages in a list, cannot be captured by a lambda etc.).