-
-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Span
As I understand ArrayTools consider arrays as immutable(while .NET devs have build Spans for arrays to be really immutable), may try to apply
ImTools/src/ImTools/ImTools.cs
Line 48 in 56b7f53
| public static class ArrayTools |
https://msdn.microsoft.com/en-us/magazine/mt814808.aspx?f=255&MSPPError=-2147217396
(these are only couple percentage slower)
Would you accept migration to Span in some future version?
Doc
Methods to work with immutable arrays replace with Methods to work with arrays as immutable
ImTools/src/ImTools/ImTools.cs
Line 47 in 56b7f53
| /// <summary>Methods to work with immutable arrays, and general array sugar.</summary> |
Attributes
Consider something existing which on arrays:
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
public static int BinarySearch<T>(T[] array, int index, int length, T value, IComparer<T> comparer);
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
[SecuritySafeCritical]
public static int LastIndexOf(Array array, object value, int startIndex, int count);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public ReadOnlyMemory<T> Slice(int start)
Metadata
Metadata
Assignees
Labels
No labels