Skip to content

Commit

Permalink
Merge pull request #57 from faustodavid/RemoveCommentsFromValueListPool
Browse files Browse the repository at this point in the history
Remove comments for parameterless constructor in ValueListPool<T>
  • Loading branch information
faustodavid committed Feb 11, 2020
2 parents 9644b2f + bc04c10 commit 137eab3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion README.md
Expand Up @@ -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.


Expand Down
8 changes: 5 additions & 3 deletions src/ListPool/ListPool.csproj
Expand Up @@ -12,18 +12,20 @@
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.
</Description>
<PackageTags>ASP.NET;List;System.Buffers;ArrayPool;ListPool;Performance;Span</PackageTags>
<RepositoryUrl>https://github.com/faustodavid/ListPool</RepositoryUrl>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageVersion>2.3.2</PackageVersion>
<PackageVersion>2.3.3-beta</PackageVersion>
<PackageReleaseNotes>
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
</PackageReleaseNotes>
<Copyright>Copyright © Fausto David Suarez Rosario 2020</Copyright>
</PropertyGroup>
Expand Down
6 changes: 2 additions & 4 deletions src/ListPool/ValueListPool.cs
Expand Up @@ -7,8 +7,6 @@ namespace ListPool
{
/// <summary>
/// High-performance implementation of IList with zero heap allocations.
/// IMPORTANT:Do not create ValueListPool without indicating a constructor.
/// Otherwise it wont work.
/// </summary>
/// <typeparam name="T"></typeparam>
public ref struct ValueListPool<T> where T : IEquatable<T>
Expand All @@ -25,7 +23,7 @@ public enum SourceType
private Span<T> _buffer;

/// <summary>
/// Construct ListPool with the indicated capacity.
/// Construct ValueListPool with the indicated capacity.
/// </summary>
/// <param name="capacity">Required initial capacity</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
Expand All @@ -37,7 +35,7 @@ public ValueListPool(int capacity)
}

/// <summary>
/// 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.
/// </summary>
Expand Down

0 comments on commit 137eab3

Please sign in to comment.