You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ExtendedSystemObjects/UnmanagedList.cs
+9-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
* COPYRIGHT: See COPYING in the top level directory
3
3
* PROJECT: ExtendedSystemObjects
4
4
* FILE: UnmanagedList.cs
5
-
* PURPOSE:
5
+
* PURPOSE: A dynamic array implementation that manages its own unmanaged memory, allowing for high-performance operations on large datasets without the overhead of garbage collection.
6
6
* PROGRAMMER: Peter Geinitz (Wayfarer)
7
7
*/
8
8
@@ -50,7 +50,7 @@ public sealed unsafe class UnmanagedList<T> : IUnmanagedArray<T>, IEnumerable<T>
50
50
/// The <see cref="Span{T}"/>.
51
51
/// </value>
52
52
/// <param name="range">The range.</param>
53
-
/// <returns></returns>
53
+
/// <returns>A span representing the specified range of elements.</returns>
54
54
publicSpan<T>this[Rangerange]=>AsSpan()[range];
55
55
56
56
/// <summary>
@@ -389,8 +389,15 @@ public T Peek()
389
389
return_ptr[Length-1];
390
390
}
391
391
392
+
/// <summary>
393
+
/// Sorts this instance.
394
+
/// </summary>
392
395
publicvoidSort()=>AsSpan().Sort();
393
396
397
+
/// <summary>
398
+
/// Clones this instance.
399
+
/// </summary>
400
+
/// <returns>A new <see cref="UnmanagedList{T}"/> that is a copy of the current instance.</returns>
Copy file name to clipboardExpand all lines: ExtendedSystemObjects/UnmanagedMap.cs
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,12 @@
6
6
* Unlike typical dictionaries, entries are marked as deleted (tombstoned)
7
7
* and only physically removed during explicit compaction, improving
8
8
* insertion and deletion performance by avoiding frequent reallocations.
9
+
<<<<<<< HEAD
10
+
* Optimized for integer keys and unmanaged value types, with open addressing and linear probing.
11
+
* Not thread-safe.
12
+
* Second it is not good with bigger datatypes since it has no separate container for values and uses open addressing, so it is best used with small structs or primitive types as values.
0 commit comments