mirror of
https://github.com/claunia/plist-cil.git
synced 2026-02-04 05:34:41 +00:00
[PR #36] Add support for Span<byte> #63
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/claunia/plist-cil/pull/36
State: closed
Merged: Yes
We're doing a performance review of our application and are trying to make sure of the new
Span<byte>andReadOnlySpan<byte>types which are new in .NET land.For plist-cil, working with
Span<byte>opens a lot of opportunities:byte[]array (e.g. starting at index 10 and a length of 42), without having to copy that subset to a new array (which has a performance impact)This PR adds support for reading property lists form those types to plist-cil.
It comes with a couple of drawbacks, though. That includes:
netstandard1.xandnetcoreapp1.x). It appears there's a big push to get everyone to use at leastnetstandard2.0, so that should be OKSupporting .NET Framework without adding a dependency on System.Memory and still adding support for
Span<byte>would mean duplicating a lot of code, and I'm not sure it's worth it.Would this be a problem for you?