microsoft / DbgShell

A PowerShell front-end for the Windows debugger engine.
MIT License
674 stars 89 forks source link

Introduce new C# Span/Memory features #55

Closed jazzdelightsme closed 5 years ago

jazzdelightsme commented 5 years ago

This change adds a reference to the System.Memory NuGet package, and starts using Memory< T > / Span< T > in a few spots to avoid copies. This was not done as a perf improvement (I did not measure anything); just as a learning exercise to try out these new C# features.

Unfortunately there were complications when using Memory/Span in script (see comments in DbgMemory), so it's not fit to use everywhere, but it should be fine to use internally.