Skip to content

Releases: DevAM-Tools/LargeCollections

9.0.0

29 May 20:31

Choose a tag to compare

Bumps the library version from 8.0.1 to 9.0.0. This release introduces
six new large-capable collection types, comprehensive test suites for all
new and several existing types, build-level quality gates, consolidated
global usings, standardized copyright headers, and improved developer
tooling.


New collection types

LargeBitArray

Compact, mutable bit array backed by LargeArray<ulong> (64-bit words).
Supports individual bit access via indexed getter/setter as well as the
bulk methods Set, Clear, Toggle, Get, SetAll, Not, And,
Or, Xor, CountSetBits, and Clone. The last word is always masked
after bulk operations so bits beyond BitCount are invariably zero.
CountSetBits uses BitOperations.PopCount on .NET 6+ for hardware-
accelerated population counting with a portable fallback for older TFMs.

LargeBuffer

Fixed-capacity raw byte buffer exposed as a struct (copy-by-reference
semantics via the shared backing array). The generic element type
controls the maximum addressable byte capacity
(int.MaxValue × sizeof(TElement)). Returns arbitrarily-aligned
Span<byte> windows via MemoryMarshal.Cast with O(1) arithmetic.
Predefined element types LargeBufferElement8LargeBufferElement1K
cover common stride sizes.

LargeCircularBuffer

Fixed-capacity ring buffer backed by LargeArray<T> with O(1)
Enqueue, Dequeue, and Peek. Overflow behavior is configurable at
construction time: Throw (default) raises InvalidOperationException;
Overwrite silently discards the oldest element. Implements
IEnumerable<T> for in-order traversal without allocation.

LargeQueue

FIFO queue backed by LargeArray<T> with amortized O(1) Enqueue and
O(1) Dequeue / Peek. Implements IEnumerable<T>.

LargeStack

LIFO stack backed by LargeArray<T> with O(1) Push, Pop, and
Peek. Implements IEnumerable<T>.

LargePriorityQueue<TElement, TPriority>

Generic min-heap priority queue backed by LargeArray<T> with O(log n)
Enqueue and DequeueMin. Accepts a custom IComparer<TPriority> or
falls back to Comparer<TPriority>.Default.


Tests

New test classes with exhaustive coverage of happy paths, boundary
conditions, empty-collection edges, and error paths:

  • LargeBitArrayTest
  • LargeBufferTest
  • LargeCircularBufferTest
  • LargePriorityQueueTest
  • LargeQueueTest
  • LargeStackTest
  • LargeStringTest
  • LargeStringBuilderTest

All test classes migrated to use the new GlobalUsings.cs and TUnit
assertion helpers (await Assert.That(…).Is…).


Build infrastructure

Directory.Build.props — the following properties are now set
centrally for all projects in the solution:

  • ImplicitUsings = enable
  • TreatWarningsAsErrors = true
  • EnableNETAnalyzers = true
  • AnalysisLevel = latest
  • EnforceCodeStyleInBuild = true

GlobalUsings.cs — each project now has a dedicated GlobalUsings.cs
that consolidates all solution-wide global using directives; redundant
per-file using directives have been removed from every source file.


License header standardization

Verbose MIT block-comment headers (≈ 25 lines each) have been replaced
with a compact single-line copyright comment across all source files in
LargeCollections, LargeCollections.DiskCache,
LargeCollections.Observable, and LargeCollections.Test.


DiskCache improvements

  • Added CheckNotDisposed() guard (using Volatile.Read for
    thread-safe single-write / multi-read dispose detection) to all public
    entry points.
  • Added XML <remarks> block documenting the intentional durability
    trade-offs (journal_mode = OFF, synchronous = OFF).
  • Added XML doc to all previously undocumented public members.

LargeObservableCollection

  • Sealed the class (public sealed class) — the type was not designed
    for inheritance.
  • Added complete XML documentation to all members.
  • Improved inline thread-safety commentary (suspension counters updated
    atomically; data mutations and event delivery not thread-safe).

Developer tooling

  • .github/copilot-instructions.md — comprehensive project-specific
    coding standards for GitHub Copilot (naming, nullable, thread safety,
    performance, testing, documentation, git rules).
  • .github/prompts/Plan.prompt.md — plan-phase prompt.
  • .github/prompts/Review.prompt.md — review-phase prompt.
  • .github/prompts/Implement.prompt.md — implement-phase prompt.
  • .github/prompts/ComplexTask.prompt.md — complex-task orchestration
    prompt.
  • .vscode/tasks.jsonbuild-all, build-tests, test, clean,
    and restore tasks for VS Code.

BREAKING CHANGE: Assembly version 9.0.0. Consumers referencing
LargeCollections by exact assembly version must update their binding
redirects or <PackageReference> version constraints.

8.0.1

07 Dec 09:44

Choose a tag to compare

8.0.1

Fix missing upgrade to major version 8

8.0.0

07 Dec 09:41

Choose a tag to compare

8.0.0

LargeBPlusTree

  • Self-balancing B+Tree for sorted key-value storage
  • O(log n) insert, delete, and lookup operations
  • Efficient range queries with in-order iteration
  • Factory methods for ascending/descending order with struct comparers

LargeKDTree

  • High-performance KD-Tree for spatial indexing
  • Implicit array layout (no pointer chasing)
  • Allocation-free nearest neighbor and range queries
  • Struct-based point accessors for JIT devirtualization

LargeBKDTree

  • Block-based KD-Tree variant for large point sets
  • Optimized for range queries and bounding box searches

Hash Collections (LargeSet, LargeDictionary)

  • Replaced open addressing with separate chaining
  • Index-based linking using HashEntry<T> struct (similar to .NET Dictionary)
  • Free-list for efficient entry reuse after deletions
  • Extend capacity before adding to avoid mid-operation rehashing

Enumerator Optimizations

  • New LargeStorageEnumerator<T> struct enumerator for LargeList
  • New LargeSpanEnumerator<T> and ReadOnlyLargeSpanEnumerator<T>
  • Direct chunk-by-chunk storage access instead of yield-based iteration
  • GetEnumerator() now returns struct enumerator for foreach optimization

Storage Optimizations

  • StorageGetRef, StorageGet, StorageSet: Inline index calculation (removed StorageGetIndex call)
  • StorageSwap: Direct index computation instead of 4 method calls
  • New GetStructEnumerator() and AsStructEnumerable() extension methods

Other Changes

  • Removed unnecessary [MethodImpl(AggressiveInlining)] from yield-based methods
  • Updated README with user-friendly descriptions
  • Added PackageTags: BPlusTree, KDTree, BKDTree, SpatialIndex, RangeQuery, NearestNeighbor

7.0.0

01 Dec 17:26

Choose a tag to compare

-Refactor code structure for improved readability and maintainability

6.0.0

12 Nov 18:09

Choose a tag to compare

6.0.0

-Add LargeSpan and ReadOnlyLargeSpan for enhanced slicing capabilities
-Add LargeLinkedList
-bug fixes
-Refactor LargeDictionary
-Rewrite tests

5.0.2

17 Oct 14:47

Choose a tag to compare

5.0.2

-Fix major bug in StorageResize

5.0.1

16 Oct 16:15

Choose a tag to compare

5.0.1

-Fix span API conditions

-Add net6.0 and net8.0 as target framework

5.0.0

08 Oct 18:35

Choose a tag to compare

-Add LargeObservableCollection and ReadOnlyLargeObservableCollection
-Interface redesign
-Bug fixes
-Improve Tests
-Upgrade sln to slnx

4.0.0

21 Aug 15:03

Choose a tag to compare

-Bug fixes
-Performance improvements
-API improvements
-Improved test coverage
-netstandard2.0 support