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.
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.