span<t> anyone using and how?

Anyone using span and how are you using it? Are you experience good performance? I recently got back into monogame and c#. I see they added this new feature in c#. Wondering if it benefits game dev.

Yes! (although indirectly)

It’s great for fast views into sublists. If you check out any number of modern, optimized game libraries (DefaultEcs, BEPU Physics v2), they’re riddled with Span<T>.

I used Span for short period stack allocation (instead of allocating array on the heap).

I wanted to use Span but I’m not using it. Ridiculous as it sounds, it’s creating me tons of garbage (depending on how often you use it, of course)… but only when a debugger is attached.

As 99.9% of the time I run the game with the debugger attached and I’m pretty alergic to garbage, I decided to avoid it (although in Release would work OK), but I’ll probably be using Span if they ever fix this problem.

I take a look at your code. Thanks