The Array Hiding in Every params Call
DEV Community
The Array Hiding in Every params Call
A four-line display-name helper was quietly allocating an array on every call through params T[]. Switching to C# 13's params ReadOnlySpan<T> took it from 107 MB to zero, with the call sites unchanged.
0 comments
No comments yet.