Disposable List structure allocating memory from ArrayPool
$ dotnet add package RentedListCoreDisposable List structure allocating memory from ArrayPool
| Method | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Gen1 | Allocated | Alloc Ratio |
|---|---|---|---|---|---|---|---|---|---|
| List_Add | 797.3 ns | 185.45 ns | 10.17 ns | 1.00 | 0.02 | 0.4473 | 0.0076 | 8424 B | 1.00 |
| RentedList_Add | 516.5 ns | 61.73 ns | 3.38 ns | 0.65 | 0.01 | 0.2174 | 0.0029 | 4120 B | 0.49 |
| RentedList_Add_Dispose | 467.9 ns | 55.01 ns | 3.02 ns | 0.59 | 0.01 | - | - | - | 0.00 |
| Method | Mean | Error | StdDev | Ratio |
|---|---|---|---|---|
| Array_Enumerator | 1.770 us | 0.0873 us | 0.0048 us | 1.00 |
| List_Enumerator | 2.506 us | 0.2307 us | 0.0126 us | 1.42 |
| RentedList_Enumerator | 2.364 us | 0.4903 us | 0.0269 us | 1.34 |
| Method | Mean | Error | StdDev | Ratio | RatioSD |
|---|---|---|---|---|---|
| Array_Indexer | 1.793 us | 0.4019 us | 0.0220 us | 1.00 | 0.02 |
| List_Indexer | 2.650 us | 0.1405 us | 0.0077 us | 1.48 | 0.02 |
| RentedList_Indexer | 1.915 us | 0.0873 us | 0.0048 us | 1.07 | 0.01 |
| Method | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Gen1 | Allocated | Alloc Ratio |
|---|---|---|---|---|---|---|---|---|---|
| Array_Create | 119.7 ns | 23.92 ns | 1.31 ns | 1.00 | 0.01 | 0.2136 | - | 3.93 KB | 1.00 |
| List_Create | 130.5 ns | 45.66 ns | 2.50 ns | 1.09 | 0.02 | 0.2153 | 0.0031 | 3.96 KB | 1.01 |
| RentedList_Create | 250.2 ns | 23.45 ns | 1.29 ns | 2.09 | 0.02 | 0.4325 | 0.0067 | 7.95 KB | 2.02 |
| RentedList_Create_Dispose | 146.4 ns | 42.75 ns | 2.34 ns | 1.22 | 0.02 | 0.2136 | - | 3.93 KB | 1.00 |