From 517e781fedf3d21046a8dfbb6aa5cd576dbe1150 Mon Sep 17 00:00:00 2001 From: Fausto David Date: Tue, 11 Feb 2020 23:26:43 +0100 Subject: [PATCH 1/2] Remove comments from parameterless constructor not supported. It is supported. --- README.md | 1 - src/ListPool/ValueListPool.cs | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 46063ca..afca31a 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,6 @@ Differences: * Allocation-free * Can be created using stackalloc or an array as initial buffer * **Cannot be serialized/deserialized** - * **Cannot be created with parameterless constructors**, otherwise it is created in an invalid state * Because it is ValueType when it is passed to other methods, it is passed by copy, not by reference. In case it is required to be updated, it is required to use the "ref" modifier in the parameter. diff --git a/src/ListPool/ValueListPool.cs b/src/ListPool/ValueListPool.cs index 9ec0b6f..27c1abe 100644 --- a/src/ListPool/ValueListPool.cs +++ b/src/ListPool/ValueListPool.cs @@ -7,8 +7,6 @@ namespace ListPool { /// /// High-performance implementation of IList with zero heap allocations. - /// IMPORTANT:Do not create ValueListPool without indicating a constructor. - /// Otherwise it wont work. /// /// public ref struct ValueListPool where T : IEquatable @@ -25,7 +23,7 @@ public enum SourceType private Span _buffer; /// - /// Construct ListPool with the indicated capacity. + /// Construct ValueListPool with the indicated capacity. /// /// Required initial capacity [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -37,7 +35,7 @@ public ValueListPool(int capacity) } /// - /// Construct the ListPool using the giving source. + /// Construct the ValueListPool using the giving source. /// It can use the source as initial buffer in order to reuse the array or /// use the data and wrapper it inside the ListPool or copy the data into new pooled array. /// From bc04c106878980b38060301c589af4699d4fba89 Mon Sep 17 00:00:00 2001 From: Fausto David Date: Tue, 11 Feb 2020 23:46:32 +0100 Subject: [PATCH 2/2] update nuget information --- src/ListPool/ListPool.csproj | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ListPool/ListPool.csproj b/src/ListPool/ListPool.csproj index 6b0f6e2..51138c6 100644 --- a/src/ListPool/ListPool.csproj +++ b/src/ListPool/ListPool.csproj @@ -12,7 +12,8 @@ ListPool and ValueListPool are optimized allocation free implementations of IList using ArrayPool. Changelog: - * Support for netstandard2_0 + * Performance enhancement in the method AddRange(T[] items) for ListPool and ValueListPool + * ValueListPool now can be created with parameterless constructor ListPool is the general use of the implementation, we recommend to use ListPool for most of the cases. ValueListPool is the zero heap allocations implementation, it is optimal working along stackalloc initial buffer for small lists. Note, because it is a struct it is passed by value, not by reference. @@ -20,10 +21,11 @@ https://github.com/faustodavid/ListPool true LICENSE - 2.3.2 + 2.3.3-beta Changelog: - * Multitarget frameworks to support netstandard2_0. + * Performance enhancement in the method AddRange(T[] items) for ListPool and ValueListPool + * ValueListPool now can be created with parameterless constructor Copyright © Fausto David Suarez Rosario 2020